aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be_iscsi.c
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohank@gmail.com>2013-09-28 18:35:50 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-10-25 04:58:08 -0400
commit1e4be6ff41573139620080268a1aa6d1d8726358 (patch)
tree662348d04703c2fd1e83e76795f9d365bcc3e2f3 /drivers/scsi/be2iscsi/be_iscsi.c
parent0a3db7c0a3e566e872aa9b0ac2eaf1353be7ffcc (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_iscsi.c')
-rw-r--r--drivers/scsi/be2iscsi/be_iscsi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index 63b2be0f58a8..a7cd92c3c383 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -194,6 +194,8 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
194 struct beiscsi_conn *beiscsi_conn = conn->dd_data; 194 struct beiscsi_conn *beiscsi_conn = conn->dd_data;
195 struct Scsi_Host *shost = iscsi_session_to_shost(cls_session); 195 struct Scsi_Host *shost = iscsi_session_to_shost(cls_session);
196 struct beiscsi_hba *phba = iscsi_host_priv(shost); 196 struct beiscsi_hba *phba = iscsi_host_priv(shost);
197 struct hwi_controller *phwi_ctrlr = phba->phwi_ctrlr;
198 struct hwi_wrb_context *pwrb_context;
197 struct beiscsi_endpoint *beiscsi_ep; 199 struct beiscsi_endpoint *beiscsi_ep;
198 struct iscsi_endpoint *ep; 200 struct iscsi_endpoint *ep;
199 201
@@ -214,9 +216,13 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
214 return -EEXIST; 216 return -EEXIST;
215 } 217 }
216 218
219 pwrb_context = &phwi_ctrlr->wrb_context[BE_GET_CRI_FROM_CID(
220 beiscsi_ep->ep_cid)];
221
217 beiscsi_conn->beiscsi_conn_cid = beiscsi_ep->ep_cid; 222 beiscsi_conn->beiscsi_conn_cid = beiscsi_ep->ep_cid;
218 beiscsi_conn->ep = beiscsi_ep; 223 beiscsi_conn->ep = beiscsi_ep;
219 beiscsi_ep->conn = beiscsi_conn; 224 beiscsi_ep->conn = beiscsi_conn;
225 beiscsi_conn->doorbell_offset = pwrb_context->doorbell_offset;
220 226
221 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, 227 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
222 "BS_%d : beiscsi_conn=%p conn=%p ep_cid=%d\n", 228 "BS_%d : beiscsi_conn=%p conn=%p ep_cid=%d\n",