[PATCH 4.18 058/158] scsi: qla2xxx: Fix unintended Logout
4.18-stable review patch. If anyone has any objections, please let me know. -- From: Quinn Tran [ Upstream commit cb97f2c2e8d9f8c71ddbf04ad57e163ee6d86474 ] During normal IO, FW can return IO with 'port unavailble' status. Driver would send a LOGO to remote port for session resync. On an off chance, a PLOGI could arrive before sending the LOGO. This patch will skip sendiing LOGO if a PLOGI just came in. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_target.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -982,8 +982,9 @@ void qlt_free_session_done(struct work_s logo.id = sess->d_id; logo.cmd_count = 0; + if (!own) + qlt_send_first_logo(vha, ); sess->send_els_logo = 0; - qlt_send_first_logo(vha, ); } if (sess->logout_on_delete && sess->loop_id != FC_NO_LOOP_ID) {
[PATCH 4.18 058/158] scsi: qla2xxx: Fix unintended Logout
4.18-stable review patch. If anyone has any objections, please let me know. -- From: Quinn Tran [ Upstream commit cb97f2c2e8d9f8c71ddbf04ad57e163ee6d86474 ] During normal IO, FW can return IO with 'port unavailble' status. Driver would send a LOGO to remote port for session resync. On an off chance, a PLOGI could arrive before sending the LOGO. This patch will skip sendiing LOGO if a PLOGI just came in. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_target.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -982,8 +982,9 @@ void qlt_free_session_done(struct work_s logo.id = sess->d_id; logo.cmd_count = 0; + if (!own) + qlt_send_first_logo(vha, ); sess->send_els_logo = 0; - qlt_send_first_logo(vha, ); } if (sess->logout_on_delete && sess->loop_id != FC_NO_LOOP_ID) {