scsi: core: Reduce number of scsi_test_unit_ready() retries
authorBart Van Assche <bart.vanassche@wdc.com>
Mon, 12 Feb 2018 18:57:52 +0000 (10:57 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 14 Feb 2018 02:49:17 +0000 (21:49 -0500)
commit9b91fd34b46ded81232de3ce41b9b662ec74b07f
tree999518f7e93a73e4b9eb42c3f3850864e29e9cc1
parent9866306795c207b52d49ac5f8dc7cdec9363b67f
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>
drivers/scsi/scsi_lib.c