[PATCH] fix retries of scsi device in scsi library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The computation of retries for sdev is not correct since it is less
than what the caller asks.

Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
---

--- a/drivers/scsi/scsi_lib.c	2010-09-13 07:07:38.000000000 +0800
+++ b/drivers/scsi/scsi_lib.c	2010-11-06 19:34:18.000000000 +0800
@@ -2000,7 +2000,7 @@ scsi_test_unit_ready(struct scsi_device
 		    sshdr->sense_key == UNIT_ATTENTION)
 			sdev->changed = 1;
 	} while (scsi_sense_valid(sshdr) &&
-		 sshdr->sense_key == UNIT_ATTENTION && --retries);
+		 sshdr->sense_key == UNIT_ATTENTION && retries--);

 	if (!sshdr)
 		/* could not allocate sense buffer, so can't process it */
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux