diff options
author | Jitendra Bhivare <jitendra.bhivare@avagotech.com> | 2016-01-20 14:10:51 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-02-23 21:27:02 -0500 |
commit | cdaa4ded06d990f2fa971d24a72c2849cbe1d218 (patch) | |
tree | c7ae389bf351380c96fa4b215922c2f981dbd67b /drivers/scsi/be2iscsi/be_cmds.c | |
parent | 3c9d903b17a3181fc0d2cd2a0e66c499c3c57dbc (diff) | |
download | linux-cdaa4ded06d990f2fa971d24a72c2849cbe1d218.tar.gz linux-cdaa4ded06d990f2fa971d24a72c2849cbe1d218.tar.bz2 linux-cdaa4ded06d990f2fa971d24a72c2849cbe1d218.zip |
be2iscsi: Fix to remove shutdown entry point
Null pointer dereference in shutdown path after taking dump.
Shutdown path is not needed as FW comes up clean every time during probe
after issuing FUNCTION reset MBOX command.
Signed-off-by: Jitendra Bhivare <jitendra.bhivare@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_cmds.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_cmds.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index f93ab6d937f4..66a1fc3f3ddc 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c @@ -417,22 +417,11 @@ static struct be_mcc_compl *be_mcc_compl_get(struct beiscsi_hba *phba) } /** - * be2iscsi_fail_session(): Closing session with appropriate error + * beiscsi_fail_session(): Closing session with appropriate error * @cls_session: ptr to session - * - * Depending on adapter state appropriate error flag is passed. **/ -void be2iscsi_fail_session(struct iscsi_cls_session *cls_session) +void beiscsi_fail_session(struct iscsi_cls_session *cls_session) { - struct Scsi_Host *shost = iscsi_session_to_shost(cls_session); - struct beiscsi_hba *phba = iscsi_host_priv(shost); - uint32_t iscsi_err_flag; - - if (phba->state & BE_ADAPTER_STATE_SHUTDOWN) - iscsi_err_flag = ISCSI_ERR_INVALID_HOST; - else - iscsi_err_flag = ISCSI_ERR_CONN_FAILED; - iscsi_session_failure(cls_session->dd_data, ISCSI_ERR_CONN_FAILED); } @@ -450,7 +439,7 @@ void beiscsi_async_link_state_process(struct beiscsi_hba *phba, evt->physical_port); iscsi_host_for_each_session(phba->shost, - be2iscsi_fail_session); + beiscsi_fail_session); } else if ((evt->port_link_status & ASYNC_EVENT_LINK_UP) || ((evt->port_link_status & ASYNC_EVENT_LOGICAL) && (evt->port_fault == BEISCSI_PHY_LINK_FAULT_NONE))) { |