Skip to content

Commit 9db2ad7

Browse files
Anil Gurumurthygregkh
authored andcommitted
scsi: qla2xxx: Mask off Scope bits in retry delay
commit 3cedc87 upstream. Some newer target uses "Status Qualifier" response in a returned "Busy Status". This new response code of 0x4001, which is "Scope" bits, translates to "Affects all units accessible by target". Due to this new value returned in the Scope bits, driver was using that value as timeout value which resulted into driver waiting for 27min timeout. This patch masks off this Scope bits so that driver does not use this value as retry delay time. Cc: <[email protected]> Signed-off-by: Anil Gurumurthy <[email protected]> Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Reviewed-by: Martin Wilck <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9224583 commit 9db2ad7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/scsi/qla2xxx/qla_isr.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2454,8 +2454,12 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
24542454
ox_id = le16_to_cpu(sts24->ox_id);
24552455
par_sense_len = sizeof(sts24->data);
24562456
/* Valid values of the retry delay timer are 0x1-0xffef */
2457-
if (sts24->retry_delay > 0 && sts24->retry_delay < 0xfff1)
2458-
retry_delay = sts24->retry_delay;
2457+
if (sts24->retry_delay > 0 && sts24->retry_delay < 0xfff1) {
2458+
retry_delay = sts24->retry_delay & 0x3fff;
2459+
ql_dbg(ql_dbg_io, sp->vha, 0x3033,
2460+
"%s: scope=%#x retry_delay=%#x\n", __func__,
2461+
sts24->retry_delay >> 14, retry_delay);
2462+
}
24592463
} else {
24602464
if (scsi_status & SS_SENSE_LEN_VALID)
24612465
sense_len = le16_to_cpu(sts->req_sense_length);

0 commit comments

Comments
 (0)