From 9343be749085c2229622ef47058dca4937e30882 Mon Sep 17 00:00:00 2001 From: Jayamohan Kallickal Date: Wed, 29 Jan 2014 02:16:43 -0500 Subject: [SCSI] be2iscsi: Fix the session cleanup when reboot/shutdown happens In iSCSI Boot scenario, when machine is reboot/shutdown phase the active sessions are not closed. Driver queue cleanup is done as part of unload and device is disabled. Sessions are still active, iSCSI commands are issued from session which comes to driver, as driver cleanup and device disabled there is kernel stack dump with errors. Fix is invoking iscsi_session_failure with ISCSI_ERR_INVALID_HOST on all the active sessions when shutdown routine is called. Signed-off-by: John Soni Jose Signed-off-by: Jayamohan Kallickal Reviewed-by: Mike Christie Signed-off-by: James Bottomley --- drivers/scsi/be2iscsi/be_iscsi.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/scsi/be2iscsi/be_iscsi.c') diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index a7a210ef407c..a3df43324c98 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c @@ -1361,6 +1361,7 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint *ep) beiscsi_mccq_compl(phba, tag, NULL, NULL); beiscsi_close_conn(beiscsi_ep, tcp_upload_flag); free_ep: + msleep(BEISCSI_LOGOUT_SYNC_DELAY); beiscsi_free_ep(beiscsi_ep); beiscsi_unbind_conn_to_cid(phba, beiscsi_ep->ep_cid); iscsi_destroy_endpoint(beiscsi_ep->openiscsi_ep); -- cgit v1.2.3-59-g8ed1b