summaryrefslogtreecommitdiff
path: root/drivers/scsi/be2iscsi/be_main.c
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>2014-01-29 11:16:43 +0400
committerJames Bottomley <JBottomley@Parallels.com>2014-03-15 21:19:11 +0400
commit9343be749085c2229622ef47058dca4937e30882 (patch)
tree5191be14f1cd0504aedda9af07dd534ce9441bd8 /drivers/scsi/be2iscsi/be_main.c
parente08b3c8b11e9c49ac95cf0fff5bd6cff32de13a4 (diff)
downloadlinux-9343be749085c2229622ef47058dca4937e30882.tar.xz
[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 <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.c')
-rw-r--r--drivers/scsi/be2iscsi/be_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 89c95f1537e8..b1b6e74e0b7c 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -5301,6 +5301,8 @@ static void beiscsi_shutdown(struct pci_dev *pcidev)
return;
}
+ phba->state = BE_ADAPTER_STATE_SHUTDOWN;
+ iscsi_host_for_each_session(phba->shost, be2iscsi_fail_session);
beiscsi_quiesce(phba, BEISCSI_CLEAN_UNLOAD);
pci_disable_device(pcidev);
}