Skip to contentSkip to conversation

libata: implement no[hs]rst force params

PATCH Applied Tejun Heo 2 participants 2 messages Aug 13, 2008 – Aug 22, 2008

Subsystems (2)
lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 libata: implement no[hs]rst force params

Implement force params nohrst, nosrst and norst. This is to work around reset related problems and ease debugging.

---
Dino Wu, specifying libata.force=nohrst will work around the problem till the problem is properly fixed.

Thanks.

 Documentation/kernel-parameters.txt |    3 ++
 drivers/ata/libata-core.c           |   46 +++++++++++++++++++++++-------------
 drivers/ata/libata-eh.c             |    4 +++
 include/linux/libata.h              |    1 
 4 files changed, 38 insertions(+), 16 deletions(-)
Documentation/kernel-parameters.txt +3 -0
index b52f47d..4e45516 100644
@@ -1015,6 +1015,9 @@ and is between 256 and 4096 characters. It is defined in the file
 
 			* [no]ncq: Turn on or off NCQ.
 
+			* nohrst, nosrst, norst: suppress hard, soft
+                          and both resets.
+
 			If there are multiple matching configurations changing
 			the same attribute, the last one is used.
 
drivers/ata/libata-core.c +30 -16

84 lines not on this page · raw message

drivers/ata/libata-eh.c +4 -0
index 58bdc53..a570ca4 100644
@@ -2210,6 +2210,10 @@ int ata_eh_reset(struct ata_link *link, int classify,
 	 */
 	while (ata_eh_reset_timeouts[max_tries] != ULONG_MAX)
 		max_tries++;
+	if (link->flags & ATA_LFLAG_NO_HRST)
+		hardreset = NULL;
+	if (link->flags & ATA_LFLAG_NO_SRST)
+		softreset = NULL;
 
 	now = jiffies;
 	deadline = ata_deadline(ehc->last_reset, ATA_EH_RESET_COOL_DOWN);
include/linux/libata.h +1 -0
index 5b247b8..12b8013 100644
@@ -163,6 +163,7 @@ enum {
 	ATA_DEV_NONE		= 9,	/* no device */
 
 	/* struct ata_link flags */
+	ATA_LFLAG_NO_HRST	= (1 << 1), /* avoid hardreset */
 	ATA_LFLAG_NO_SRST	= (1 << 2), /* avoid softreset */
 	ATA_LFLAG_ASSUME_ATA	= (1 << 3), /* assume ATA class */
 	ATA_LFLAG_ASSUME_SEMB	= (1 << 4), /* assume SEMB class */
Applied
#1 lore raw
Quoted 8 lines · Tejun Heo

Implement force params nohrst, nosrst and norst. This is to work around reset related problems and ease debugging.

---
Dino Wu, specifying libata.force=nohrst will work around the problem till the problem is properly fixed.

Quoted 7 lines

Thanks.

 Documentation/kernel-parameters.txt |    3 ++
 drivers/ata/libata-core.c           |   46 +++++++++++++++++++++++-------------
 drivers/ata/libata-eh.c             |    4 +++
 include/linux/libata.h              |    1 
 4 files changed, 38 insertions(+), 16 deletions(-)

applied