From: Jeff Garzik <jeff@garzik.org>
To: Tejun Heo <htejun@gmail.com>
Cc: IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: [PATCH #upstream] libata: make EH fail gracefully if no reset method is available
Date: Mon, 11 Feb 2008 14:25:28 -0500 [thread overview]
Message-ID: <47B0A128.4020002@garzik.org> (raw)
In-Reply-To: <47A040E2.1050801@gmail.com>
Tejun Heo wrote:
> When no reset method is available, libata currently oopses. Although
> the condition can't happen unless there's a bug in a low level driver,
> oopsing isn't the best way to report the error condition. Complain,
> dump stack and fail reset instead.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
> This patch is on top of
>
> upstream (a984f58dd97f22f5113700322fed311a0ee29947)
> + prefer-hardreset patchset
> http://thread.gmane.org/gmane.linux.ide/27447
>
> drivers/ata/libata-eh.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index 64418f1..8d82b06 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -2135,9 +2135,14 @@ int ata_eh_reset(struct ata_link *link, int classify,
> if (hardreset) {
> reset = hardreset;
> ehc->i.action = ATA_EH_HARDRESET;
> - } else {
> + } else if (softreset) {
> reset = softreset;
> ehc->i.action = ATA_EH_SOFTRESET;
> + } else {
> + ata_link_printk(link, KERN_ERR, "BUG: no reset method, "
> + "please report to linux-ide@vger.kernel.org\n");
> + dump_stack();
> + return -EINVAL;
ACK, but holding due to hold on prefer-hardreset patch (pinging device
manufacturers)
next prev parent reply other threads:[~2008-02-11 19:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-30 9:18 [PATCH #upstream] libata: make EH fail gracefully if no reset method is available Tejun Heo
2008-02-01 20:35 ` Jeff Garzik
2008-02-11 19:25 ` Jeff Garzik [this message]
2008-03-11 3:45 ` Tejun Heo
2008-04-12 5:18 ` 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=47B0A128.4020002@garzik.org \
--to=jeff@garzik.org \
--cc=htejun@gmail.com \
--cc=linux-ide@vger.kernel.org \
/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).