[SCSI] be2iscsi: Fix the session cleanup when reboot/shutdown happens
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Wed, 29 Jan 2014 07:16:43 +0000 (02:16 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 15 Mar 2014 17:19:11 +0000 (10:19 -0700)
commit9343be749085c2229622ef47058dca4937e30882
tree5191be14f1cd0504aedda9af07dd534ce9441bd8
parente08b3c8b11e9c49ac95cf0fff5bd6cff32de13a4
[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>
drivers/scsi/be2iscsi/be.h
drivers/scsi/be2iscsi/be_cmds.c
drivers/scsi/be2iscsi/be_cmds.h
drivers/scsi/be2iscsi/be_iscsi.c
drivers/scsi/be2iscsi/be_main.c
drivers/scsi/be2iscsi/be_main.h