[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>
diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
index e02e14c..77f33a4 100644
--- a/drivers/scsi/be2iscsi/be_main.h
+++ b/drivers/scsi/be2iscsi/be_main.h
@@ -97,9 +97,14 @@
 
 #define INVALID_SESS_HANDLE	0xFFFFFFFF
 
+/**
+ * Adapter States
+ **/
 #define BE_ADAPTER_LINK_UP	0x001
 #define BE_ADAPTER_LINK_DOWN	0x002
 #define BE_ADAPTER_PCI_ERR	0x004
+#define BE_ADAPTER_STATE_SHUTDOWN	0x008
+
 
 #define BEISCSI_CLEAN_UNLOAD	0x01
 #define BEISCSI_EEH_UNLOAD	0x02