Skip to contentSkip to conversation

scsi: Increase number of retries for scsi_mode_sense()

PATCH New Hannes Reinecke 1 participant 1 message Jun 12, 2015 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: Increase number of retries for scsi_mode_sense()

As scsi_mode_sense() is now retrying for any UAs it needs potentially several retries to clear any UA status. So increase the number of retries to at least 5.

---
 drivers/scsi/scsi_transport_sas.c | 2 +-
 drivers/scsi/sr.c                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/scsi_transport_sas.c +1 -1
index 9a05819..a02ed82 100644
@@ -1280,7 +1280,7 @@ int sas_read_port_mode_page(struct scsi_device *sdev)
 	if (!buffer)
 		return -ENOMEM;
 
-	res = scsi_mode_sense(sdev, 1, 0x19, buffer, BUF_SIZE, 30*HZ, 3,
+	res = scsi_mode_sense(sdev, 1, 0x19, buffer, BUF_SIZE, 30*HZ, 5,
 			      &mode_data, NULL);
 
 	error = -EINVAL;
drivers/scsi/sr.c +1 -1
index 8bd54a6..9733452 100644
@@ -858,7 +858,7 @@ static void get_capabilities(struct scsi_cd *cd)
 
 	/* ask for mode page 0x2a */
 	rc = scsi_mode_sense(cd->device, 0, 0x2a, buffer, 128,
-			     SR_TIMEOUT, 3, &data, NULL);
+			     SR_TIMEOUT, 5, &data, NULL);
 
 	if (!scsi_status_is_good(rc)) {
 		/* failed, drive doesn't have capabilities mode page */
Signature · 1 line
1.8.5.2