linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH #upstream-fixes 1/2] libata: allow LLDs w/o any reset method
@ 2008-03-06  4:09 Tejun Heo
  2008-03-06  4:12 ` [PATCH #upstream-fixes 2/2] libata-sff: handle controllers w/o ctl register Tejun Heo
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tejun Heo @ 2008-03-06  4:09 UTC (permalink / raw)
  To: Jeff Garzik, IDE/ATA development list, Ingo Molnar

Some old SFF controllers don't have any way to reset the channel.
Currently, this isn't supported and libata EH causes an oops.  Allow
LLDs w/o any reset method and just assume ATA class in such cases.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 drivers/ata/libata-eh.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

Index: work/drivers/ata/libata-eh.c
===================================================================
--- work.orig/drivers/ata/libata-eh.c
+++ work/drivers/ata/libata-eh.c
@@ -2150,6 +2150,15 @@ int ata_eh_reset(struct ata_link *link, 
 			ap->ops->set_piomode(ap, dev);
 	}
 
+	if (!softreset && !hardreset) {
+		if (verbose)
+			ata_link_printk(link, KERN_INFO, "no reset method "
+					"available, skipping reset\n");
+		if (!(lflags & ATA_LFLAG_ASSUME_CLASS))
+			lflags |= ATA_LFLAG_ASSUME_ATA;
+		goto done;
+	}
+
 	/* Determine which reset to use and record in ehc->i.action.
 	 * prereset() may examine and modify it.
 	 */
@@ -2254,6 +2263,7 @@ int ata_eh_reset(struct ata_link *link, 
 		lflags |= ATA_LFLAG_ASSUME_ATA;
 	}
 
+ done:
 	ata_link_for_each_dev(dev, link) {
 		/* After the reset, the device state is PIO 0 and the
 		 * controller state is undefined.  Reset also wakes up

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

end of thread, other threads:[~2008-03-11  0:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-06  4:09 [PATCH #upstream-fixes 1/2] libata: allow LLDs w/o any reset method Tejun Heo
2008-03-06  4:12 ` [PATCH #upstream-fixes 2/2] libata-sff: handle controllers w/o ctl register Tejun Heo
2008-03-06 10:25 ` [PATCH #upstream-fixes 1/2] libata: allow LLDs w/o any reset method Ingo Molnar
2008-03-11  0:51 ` Jeff Garzik
2008-03-11  0:53   ` Jeff Garzik

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).