Hi All,

Please, remove Quoc Tran ([email protected]) from this email.  I think the 
correct contact is Quinn Tran ([email protected])

Thanks
Quoc

-----Original Message-----
From: Greg Kroah-Hartman <[email protected]> 
Sent: Thursday, May 9, 2019 11:43 AM
To: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>; [email protected]; 
Quoc Tran <[email protected]>; Himanshu Madhani <[email protected]>; Ewan D. 
Milne <[email protected]>; Martin K. Petersen <[email protected]>
Subject: [EXT] [PATCH 4.19 60/66] scsi: qla2xxx: Fix device staying in blocked 
state

External Email

----------------------------------------------------------------------
From: Quinn Tran <[email protected]>

commit 2137490f2147a8d0799b72b9a1023efb012d40c7 upstream.

This patch fixes issue reported by some of the customers, who discovered that 
after cable pull scenario the devices disappear and path seems to remain in 
blocked state. Once the device reappears, driver does not seem to update path 
to online. This issue appears because of the defer flag creating race condition 
where the same session reappears.  This patch fixes this issue by indicating 
SCSI-ML of device lost when
qlt_free_session_done() is called from qlt_unreg_sess().

Fixes: 41dc529a4602a ("qla2xxx: Improve RSCN handling in driver")
Signed-off-by: Quinn Tran <[email protected]>
Cc: [email protected] #4.19
Signed-off-by: Himanshu Madhani <[email protected]>
Reviewed-by: Ewan D. Milne <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/scsi/qla2xxx/qla_target.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -981,6 +981,8 @@ void qlt_free_session_done(struct work_s
                sess->send_els_logo);
 
        if (!IS_SW_RESV_ADDR(sess->d_id)) {
+               qla2x00_mark_device_lost(vha, sess, 0, 0);
+
                if (sess->send_els_logo) {
                        qlt_port_logo_t logo;
 
@@ -1161,8 +1163,6 @@ void qlt_unreg_sess(struct fc_port *sess
        if (sess->se_sess)
                vha->hw->tgt.tgt_ops->clear_nacl_from_fcport_map(sess);
 
-       qla2x00_mark_device_lost(vha, sess, 0, 0);
-
        sess->deleted = QLA_SESS_DELETION_IN_PROGRESS;
        sess->disc_state = DSC_DELETE_PEND;
        sess->last_rscn_gen = sess->rscn_gen;


Reply via email to