From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jeff@garzik.org>,
IDE/ATA development list <linux-ide@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>
Subject: [PATCH #upstream-fixes 1/2] libata: allow LLDs w/o any reset method
Date: Thu, 06 Mar 2008 13:09:34 +0900 [thread overview]
Message-ID: <47CF6E7E.6090201@gmail.com> (raw)
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
next reply other threads:[~2008-03-06 4:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-06 4:09 Tejun Heo [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47CF6E7E.6090201@gmail.com \
--to=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).