linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [SCSI PATCH] sd: max-retries becomes configurable
@ 2012-09-24 21:00 Jeff Garzik
  2012-09-25  4:06 ` James Bottomley
  0 siblings, 1 reply; 9+ messages in thread
From: Jeff Garzik @ 2012-09-24 21:00 UTC (permalink / raw)
  To: linux-scsi; +Cc: LKML



 drivers/scsi/sd.c |    4 ++++
 drivers/scsi/sd.h |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 4df73e5..d15074b 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -92,6 +92,10 @@ MODULE_ALIAS_SCSI_DEVICE(TYPE_DISK);
 MODULE_ALIAS_SCSI_DEVICE(TYPE_MOD);
 MODULE_ALIAS_SCSI_DEVICE(TYPE_RBC);
 
+static int sd_max_retries = 5;
+module_param_named(max_retries, sd_max_retries, int, 0644);
+MODULE_PARM_DESC(max_retries, "Maximum number of retries, before failing command (default 5)");
+
 #if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT)
 #define SD_MINORS	16
 #else
diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h
index f703f48..f8488fa 100644
--- a/drivers/scsi/sd.h
+++ b/drivers/scsi/sd.h
@@ -18,7 +18,7 @@
 /*
  * Number of allowed retries
  */
-#define SD_MAX_RETRIES		5
+#define SD_MAX_RETRIES		sd_max_retries
 #define SD_PASSTHROUGH_RETRIES	1
 #define SD_MAX_MEDIUM_TIMEOUTS	2
 

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-10-01  7:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-24 21:00 [SCSI PATCH] sd: max-retries becomes configurable Jeff Garzik
2012-09-25  4:06 ` James Bottomley
2012-09-25  5:21   ` Jeff Garzik
2012-09-25 10:38     ` James Bottomley
2012-09-27  5:04       ` Jeff Garzik
2012-10-01  7:43       ` Ric Wheeler
2012-09-27  2:20   ` Martin K. Petersen
2012-09-27  4:45     ` James Bottomley
2012-09-28 18:39     ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).