Message ID | 20190912180918.6436-3-hmadhani@marvell.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | qla2xxx: Bug fixes for the driver | expand |
On 9/12/19 11:09 AM, Himanshu Madhani wrote: > From: Quinn Tran <qutran@marvell.com> > > There are instances, though rare, where a LOGO request > cannot be sent out and the thread in free session done > can wait indefinitely. Fix this by putting an upper > bound to sleep. > > Signed-off-by: Quinn Tran <qutran@marvell.com> > Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> > --- > drivers/scsi/qla2xxx/qla_target.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c > index 0ffda6171614..b58ecd2d7fb6 100644 > --- a/drivers/scsi/qla2xxx/qla_target.c > +++ b/drivers/scsi/qla2xxx/qla_target.c > @@ -1020,6 +1020,7 @@ void qlt_free_session_done(struct work_struct *work) > > if (logout_started) { > bool traced = false; > + u16 cnt = 0; > > while (!READ_ONCE(sess->logout_completed)) { > if (!traced) { > @@ -1029,6 +1030,9 @@ void qlt_free_session_done(struct work_struct *work) > traced = true; > } > msleep(100); > + cnt++; > + if (cnt > 200) > + break; > } > > ql_dbg(ql_dbg_disc, vha, 0xf087, > Hi Himanshu, Is qla2x00_async_iocb_timeout() called if no response is received for a LOGO request? If so, has it been considered to modify that function instead of qlt_free_session_done()? Thanks, Bart.
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 0ffda6171614..b58ecd2d7fb6 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -1020,6 +1020,7 @@ void qlt_free_session_done(struct work_struct *work) if (logout_started) { bool traced = false; + u16 cnt = 0; while (!READ_ONCE(sess->logout_completed)) { if (!traced) { @@ -1029,6 +1030,9 @@ void qlt_free_session_done(struct work_struct *work) traced = true; } msleep(100); + cnt++; + if (cnt > 200) + break; } ql_dbg(ql_dbg_disc, vha, 0xf087,