summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-02-12 10:57:52 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-02-13 21:49:17 -0500
commit9b91fd34b46ded81232de3ce41b9b662ec74b07f (patch)
tree999518f7e93a73e4b9eb42c3f3850864e29e9cc1 /drivers/scsi/scsi_lib.c
parent9866306795c207b52d49ac5f8dc7cdec9363b67f (diff)
downloadtalos-obmc-linux-9b91fd34b46ded81232de3ce41b9b662ec74b07f.tar.gz
talos-obmc-linux-9b91fd34b46ded81232de3ce41b9b662ec74b07f.zip
scsi: core: Reduce number of scsi_test_unit_ready() retries
Make scsi_test_unit_ready() send at most as many TURs as specified in the 'retries' argument instead of retries * (retries + 1) / 2. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index a86df9ca7d1c..aea5a1ae318b 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -2607,7 +2607,7 @@ scsi_test_unit_ready(struct scsi_device *sdev, int timeout, int retries,
/* try to eat the UNIT_ATTENTION if there are enough retries */
do {
result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL, 0, sshdr,
- timeout, retries, NULL);
+ timeout, 1, NULL);
if (sdev->removable && scsi_sense_valid(sshdr) &&
sshdr->sense_key == UNIT_ATTENTION)
sdev->changed = 1;
OpenPOWER on IntegriCloud