diff options
author | Jayamohan Kallickal <jayamohank@gmail.com> | 2013-09-28 18:35:50 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-10-25 04:58:08 -0400 |
commit | 1e4be6ff41573139620080268a1aa6d1d8726358 (patch) | |
tree | 662348d04703c2fd1e83e76795f9d365bcc3e2f3 /drivers/scsi/be2iscsi/be_mgmt.c | |
parent | 0a3db7c0a3e566e872aa9b0ac2eaf1353be7ffcc (diff) |
[SCSI] be2iscsi: Fix connection offload to support Dual Chute.
The connection is offload to each chute in a round-robin manner
if both the chute is loaded with iSCSI protocol
Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_mgmt.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_mgmt.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index fcb9976e5ec6..bcddc9fb23a2 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.c +++ b/drivers/scsi/be2iscsi/be_mgmt.c | |||
@@ -628,6 +628,16 @@ unsigned int mgmt_upload_connection(struct beiscsi_hba *phba, | |||
628 | return tag; | 628 | return tag; |
629 | } | 629 | } |
630 | 630 | ||
631 | /** | ||
632 | * mgmt_open_connection()- Establish a TCP CXN | ||
633 | * @dst_addr: Destination Address | ||
634 | * @beiscsi_ep: ptr to device endpoint struct | ||
635 | * @nonemb_cmd: ptr to memory allocated for command | ||
636 | * | ||
637 | * return | ||
638 | * Success: Tag number of the MBX Command issued | ||
639 | * Failure: Error code | ||
640 | **/ | ||
631 | int mgmt_open_connection(struct beiscsi_hba *phba, | 641 | int mgmt_open_connection(struct beiscsi_hba *phba, |
632 | struct sockaddr *dst_addr, | 642 | struct sockaddr *dst_addr, |
633 | struct beiscsi_endpoint *beiscsi_ep, | 643 | struct beiscsi_endpoint *beiscsi_ep, |
@@ -645,14 +655,17 @@ int mgmt_open_connection(struct beiscsi_hba *phba, | |||
645 | struct phys_addr template_address = { 0, 0 }; | 655 | struct phys_addr template_address = { 0, 0 }; |
646 | struct phys_addr *ptemplate_address; | 656 | struct phys_addr *ptemplate_address; |
647 | unsigned int tag = 0; | 657 | unsigned int tag = 0; |
648 | unsigned int i; | 658 | unsigned int i, ulp_num; |
649 | unsigned short cid = beiscsi_ep->ep_cid; | 659 | unsigned short cid = beiscsi_ep->ep_cid; |
650 | struct be_sge *sge; | 660 | struct be_sge *sge; |
651 | 661 | ||
652 | phwi_ctrlr = phba->phwi_ctrlr; | 662 | phwi_ctrlr = phba->phwi_ctrlr; |
653 | phwi_context = phwi_ctrlr->phwi_ctxt; | 663 | phwi_context = phwi_ctrlr->phwi_ctxt; |
654 | def_hdr_id = (unsigned short)HWI_GET_DEF_HDRQ_ID(phba, 0); | 664 | |
655 | def_data_id = (unsigned short)HWI_GET_DEF_BUFQ_ID(phba, 0); | 665 | ulp_num = phwi_ctrlr->wrb_context[BE_GET_CRI_FROM_CID(cid)].ulp_num; |
666 | |||
667 | def_hdr_id = (unsigned short)HWI_GET_DEF_HDRQ_ID(phba, ulp_num); | ||
668 | def_data_id = (unsigned short)HWI_GET_DEF_BUFQ_ID(phba, ulp_num); | ||
656 | 669 | ||
657 | ptemplate_address = &template_address; | 670 | ptemplate_address = &template_address; |
658 | ISCSI_GET_PDU_TEMPLATE_ADDRESS(phba, ptemplate_address); | 671 | ISCSI_GET_PDU_TEMPLATE_ADDRESS(phba, ptemplate_address); |