During reboot/shutdown cycle, the active sessions were not updated. In iSCSI Boot case, the boot session was alive and this fix informs that the machine is going down, so no more ops happens on that session. Signed-off-by: John Soni Jose <sony.john-n@xxxxxxxxxx> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@xxxxxxxxxx> --- drivers/scsi/be2iscsi/be_cmds.c | 2 +- drivers/scsi/be2iscsi/be_cmds.h | 3 +++ drivers/scsi/be2iscsi/be_main.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index e66aa7c..a3bfc1d 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c @@ -340,7 +340,7 @@ static struct be_mcc_compl *be_mcc_compl_get(struct beiscsi_hba *phba) return NULL; } -static void be2iscsi_fail_session(struct iscsi_cls_session *cls_session) +void be2iscsi_fail_session(struct iscsi_cls_session *cls_session) { iscsi_session_failure(cls_session->dd_data, ISCSI_ERR_CONN_FAILED); } diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h index 9907308..2288625 100644 --- a/drivers/scsi/be2iscsi/be_cmds.h +++ b/drivers/scsi/be2iscsi/be_cmds.h @@ -18,6 +18,7 @@ #ifndef BEISCSI_CMDS_H #define BEISCSI_CMDS_H +#include <scsi/scsi_transport_iscsi.h> /** * The driver sends configuration and managements command requests to the * firmware in the BE. These requests are communicated to the processor @@ -735,6 +736,8 @@ int be_cmd_wrbq_create(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem, bool is_link_state_evt(u32 trailer); +void be2iscsi_fail_session(struct iscsi_cls_session *cls_session); + /* Configuration Functions */ int be_cmd_set_vlan(struct beiscsi_hba *phba, uint16_t vlan_tag); diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 228d331..672fdf6 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -4841,6 +4841,7 @@ static void beiscsi_shutdown(struct pci_dev *pcidev) return; } + iscsi_host_for_each_session(phba->shost, be2iscsi_fail_session); beiscsi_quiesce(phba); pci_disable_device(pcidev); } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html