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