From: Sreekanth Reddy Date: Thu, 5 May 2022 18:48:08 +0000 (+0530) Subject: scsi: mpi3mr: Increase I/O timeout value to 60s X-Git-Tag: v6.1-rc5~1130^2~51 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1aa529d400253eda76733dbb95b62f6cca7b274a;p=platform%2Fkernel%2Flinux-starfive.git scsi: mpi3mr: Increase I/O timeout value to 60s Set each SCSI device's default I/O timeout and default error handling I/O timeout to 60s. Link: https://lore.kernel.org/r/20220505184808.24049-3-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h index 8612b66..584659e 100644 --- a/drivers/scsi/mpi3mr/mpi3mr.h +++ b/drivers/scsi/mpi3mr/mpi3mr.h @@ -124,6 +124,9 @@ extern atomic64_t event_counter; #define MPI3MR_WATCHDOG_INTERVAL 1000 /* in milli seconds */ +#define MPI3MR_SCMD_TIMEOUT (60 * HZ) +#define MPI3MR_EH_SCMD_TIMEOUT (60 * HZ) + /* Internal admin command state definitions*/ #define MPI3MR_CMD_NOTUSED 0x8000 #define MPI3MR_CMD_COMPLETE 0x0001 diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 89a4918..3a46f88 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -3725,6 +3725,10 @@ static int mpi3mr_slave_configure(struct scsi_device *sdev) return -ENXIO; mpi3mr_change_queue_depth(sdev, tgt_dev->q_depth); + + sdev->eh_timeout = MPI3MR_EH_SCMD_TIMEOUT; + blk_queue_rq_timeout(sdev->request_queue, MPI3MR_SCMD_TIMEOUT); + switch (tgt_dev->dev_type) { case MPI3_DEVICE_DEVFORM_PCIE: /*The block layer hw sector size = 512*/