summaryrefslogtreecommitdiff
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorDon Brace <don.brace@microsemi.com>2020-07-20 16:53:03 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2020-07-24 22:09:53 -0400
commit30bda7848a23980c7eecda4a1148e093d3e98de0 (patch)
tree5c772efa13c862686405fec2ebdf6653b95d0fef /drivers/scsi/hpsa.c
parent9bb872a725f6ff34e83a6d3e7ada118f2a1da684 (diff)
scsi: hpsa: Increase controller error handling timeout
The controller can become slow to respond to SCSI INQUIRY requests resulting in the SCSI midlayer offlining the controller device. Increase the timeout value for commands sent to the controller device. Link: https://lore.kernel.org/r/159528198335.24772.7963614374905470122.stgit@brunhilda Reviewed-by: Scott Teel <scott.teel@microsemi.com> Reviewed-by: Scott Benesh <scott.benesh@microsemi.com> Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com> Signed-off-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 9b1edc541ed0..bd96bb6d0e0a 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -2134,6 +2134,7 @@ static int hpsa_slave_alloc(struct scsi_device *sdev)
}
/* configure scsi device based on internal per-device structure */
+#define CTLR_TIMEOUT (120 * HZ)
static int hpsa_slave_configure(struct scsi_device *sdev)
{
struct hpsa_scsi_dev_t *sd;
@@ -2149,6 +2150,9 @@ static int hpsa_slave_configure(struct scsi_device *sdev)
sdev->eh_timeout = HPSA_EH_PTRAID_TIMEOUT;
blk_queue_rq_timeout(sdev->request_queue,
HPSA_EH_PTRAID_TIMEOUT);
+ } else if (is_hba_lunid(sd->scsi3addr)) {
+ sdev->eh_timeout = CTLR_TIMEOUT;
+ blk_queue_rq_timeout(sdev->request_queue, CTLR_TIMEOUT);
} else {
queue_depth = sd->queue_depth != 0 ?
sd->queue_depth : sdev->host->can_queue;