diff options
author | Chad Dupuis <chad.dupuis@qlogic.com> | 2014-09-25 05:16:59 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-09-25 14:25:04 +0200 |
commit | e05fe2924892a6c3c23dc818e94ce80dbceb86b1 (patch) | |
tree | 1e12e068afb1bf09dd8bc0db09b1ff0945dbb47f /drivers/scsi/qla2xxx/qla_os.c | |
parent | 9a6e6400a9bef4a7fb11ccddf932e1868f566a73 (diff) | |
download | linux-e05fe2924892a6c3c23dc818e94ce80dbceb86b1.tar.gz linux-e05fe2924892a6c3c23dc818e94ce80dbceb86b1.tar.bz2 linux-e05fe2924892a6c3c23dc818e94ce80dbceb86b1.zip |
qla2xxx: Honor FCP_RSP retry delay timer field.
Parse the retry delay timer field from the FCP response data and if:
- It is not zero
- The SCSI status is busy or queue full
return SCSI_MLQUEUE_TARGET_BUSY for the number of milliseconds specified
in the retry delay timer field.
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index e742890d5d1b..daabf8c9c298 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -731,6 +731,15 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) goto qc24_target_busy; } + /* + * Return target busy if we've received a non-zero retry_delay_timer + * in a FCP_RSP. + */ + if (time_after(jiffies, fcport->retry_delay_timestamp)) + fcport->retry_delay_timestamp = 0; + else + goto qc24_target_busy; + sp = qla2x00_get_sp(vha, fcport, GFP_ATOMIC); if (!sp) goto qc24_host_busy; |