aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2009-11-11 17:34:30 -0500
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:01:35 -0500
commit24246de77503978cfcd7e76f06404e60e399992f (patch)
tree2644120368d5a88e2be597fb74d1ccd2e091393c /drivers/scsi
parent627511e3e67553b04f6917c03e39b797df210e04 (diff)
[SCSI] bnx2i: use common iscsi suspend queue
This just has bnx2i use the iscsi_suspend_queue helper. The suspend works as follows: When ep_poll has succeeed iscsid will call conn_bind, the LLD will then call iscsi_conn_bind which will clear the suspend bit. When ep_disconnect is called (or if there is a conn error) we set the suspend bit. For the ep_disconnect case I added a helper in the previous kernel that will take the session lock to make sure iscsi_queuecommand/xmit_task is not running and it will set the suspend bit. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/bnx2i/bnx2i.h1
-rw-r--r--drivers/scsi/bnx2i/bnx2i_iscsi.c8
2 files changed, 1 insertions, 8 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i.h b/drivers/scsi/bnx2i/bnx2i.h
index 5edde1a8c04d..2b973f3c2eb2 100644
--- a/drivers/scsi/bnx2i/bnx2i.h
+++ b/drivers/scsi/bnx2i/bnx2i.h
@@ -232,7 +232,6 @@ struct bnx2i_conn {
232 struct iscsi_cls_conn *cls_conn; 232 struct iscsi_cls_conn *cls_conn;
233 struct bnx2i_hba *hba; 233 struct bnx2i_hba *hba;
234 struct completion cmd_cleanup_cmpl; 234 struct completion cmd_cleanup_cmpl;
235 int is_bound;
236 235
237 u32 iscsi_conn_cid; 236 u32 iscsi_conn_cid;
238#define BNX2I_CID_RESERVED 0x5AFF 237#define BNX2I_CID_RESERVED 0x5AFF
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index cafb888c2376..89e84c302aa0 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -1161,9 +1161,6 @@ static int bnx2i_task_xmit(struct iscsi_task *task)
1161 struct bnx2i_cmd *cmd = task->dd_data; 1161 struct bnx2i_cmd *cmd = task->dd_data;
1162 struct iscsi_cmd *hdr = (struct iscsi_cmd *) task->hdr; 1162 struct iscsi_cmd *hdr = (struct iscsi_cmd *) task->hdr;
1163 1163
1164 if (!bnx2i_conn->is_bound)
1165 return -ENOTCONN;
1166
1167 /* 1164 /*
1168 * If there is no scsi_cmnd this must be a mgmt task 1165 * If there is no scsi_cmnd this must be a mgmt task
1169 */ 1166 */
@@ -1371,7 +1368,6 @@ static int bnx2i_conn_bind(struct iscsi_cls_session *cls_session,
1371 bnx2i_conn->ep = bnx2i_ep; 1368 bnx2i_conn->ep = bnx2i_ep;
1372 bnx2i_conn->iscsi_conn_cid = bnx2i_ep->ep_iscsi_cid; 1369 bnx2i_conn->iscsi_conn_cid = bnx2i_ep->ep_iscsi_cid;
1373 bnx2i_conn->fw_cid = bnx2i_ep->ep_cid; 1370 bnx2i_conn->fw_cid = bnx2i_ep->ep_cid;
1374 bnx2i_conn->is_bound = 1;
1375 1371
1376 ret_code = bnx2i_bind_conn_to_iscsi_cid(hba, bnx2i_conn, 1372 ret_code = bnx2i_bind_conn_to_iscsi_cid(hba, bnx2i_conn,
1377 bnx2i_ep->ep_iscsi_cid); 1373 bnx2i_ep->ep_iscsi_cid);
@@ -1896,9 +1892,7 @@ static void bnx2i_ep_disconnect(struct iscsi_endpoint *ep)
1896 conn = bnx2i_conn->cls_conn->dd_data; 1892 conn = bnx2i_conn->cls_conn->dd_data;
1897 session = conn->session; 1893 session = conn->session;
1898 1894
1899 spin_lock_bh(&session->lock); 1895 iscsi_suspend_queue(conn);
1900 bnx2i_conn->is_bound = 0;
1901 spin_unlock_bh(&session->lock);
1902 } 1896 }
1903 1897
1904 hba = bnx2i_ep->hba; 1898 hba = bnx2i_ep->hba;