From: "Fabio Comolli" <fabio.comolli@gmail.com>
To: "Tejun Heo" <htejun@gmail.com>
Cc: "Alan Cox" <alan@lxorguk.ukuu.org.uk>,
"Jeff Garzik" <jeff@garzik.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
linux-ide@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
"Greg KH" <greg@kroah.com>
Subject: Re: [PATCH] libata: don't whine if ->prereset() returns -ENOENT
Date: Mon, 12 Mar 2007 21:14:03 +0100 [thread overview]
Message-ID: <b637ec0b0703121314o747ef0bdl5c9f580b456bae43@mail.gmail.com> (raw)
In-Reply-To: <45F50E28.7010509@gmail.com>
Applied on top of latest GIT this patch make the warning[1] disappear.
Thanks,
Fabio
[1] ata2: reset failed, giving up
On 3/12/07, Tejun Heo <htejun@gmail.com> wrote:
> ->prereset() returns -ENOENT to tell libata that the port is empty and
> reset sequencing should be stopped. This is not an error condition.
> Update ata_eh_reset() such that it sets device classes to ATA_DEV_NONE
> and return success in on -ENOENT. This makes spurious error message
> go away.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
>
> This should do it and better fits the intention of the return value.
> Two things to note.
>
> 1. I think these ports should be made dummy instead of returning
> -ENOENT on prereset(). -ENOENT from prereset() was a hack to keep
> ata_piix's behavior unchanged while converting it to new EH. If no
> one objcts, I'll convert similar usages to use dummy ports after new
> init model and drop -ENOENT hack in #upstream.
>
> 2. -ENODEV sounds more appropriate. Why have I used -ENOENT. :-)
>
> Thanks.
>
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index 7349c3d..361953a 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -1625,8 +1625,14 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
> rc = prereset(ap);
> if (rc) {
> if (rc == -ENOENT) {
> - ata_port_printk(ap, KERN_DEBUG, "port disabled. ignoring.\n");
> + ata_port_printk(ap, KERN_DEBUG,
> + "port disabled. ignoring.\n");
> ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
> +
> + for (i = 0; i < ATA_MAX_DEVICES; i++)
> + classes[i] = ATA_DEV_NONE;
> +
> + rc = 0;
> } else
> ata_port_printk(ap, KERN_ERR,
> "prereset failed (errno=%d)\n", rc);
>
next prev parent reply other threads:[~2007-03-12 20:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-09 16:31 [git patches] libata (and devres) fixes Jeff Garzik
2007-03-09 21:24 ` Fabio Comolli
2007-03-09 21:43 ` Jeff Garzik
2007-03-09 23:48 ` Alan Cox
2007-03-10 15:28 ` Fabio Comolli
2007-03-12 8:24 ` [PATCH] libata: don't whine if ->prereset() returns -ENOENT Tejun Heo
2007-03-12 12:10 ` Alan Cox
2007-03-12 20:14 ` Fabio Comolli [this message]
2007-03-19 16:03 ` 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=b637ec0b0703121314o747ef0bdl5c9f580b456bae43@mail.gmail.com \
--to=fabio.comolli@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--cc=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®