From: Tejun Heo <htejun@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>, jeff@garzik.org
Cc: akpm@osdl.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: Allow a controller specific post bus reset method
Date: Mon, 21 May 2007 17:10:11 +0200 [thread overview]
Message-ID: <4651B653.8010201@gmail.com> (raw)
In-Reply-To: <20070521152843.0f202d6b@the-village.bc.nu>
Alan Cox wrote:
> The IT821x firmware mode isn't smart enough to pass the post bus reset
> checks that libata does so allow it to be over-ridden. Not sure this is
> the best long term solution but it'll do for now.
>
> Possibly a better option would be a libata-eh set of methods for
> controllers where we don't want to reset and re-identify devices.
>
> Signed-off-by: Alan Cox <alan@redhat.com>
>
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.22-rc1-mm1/drivers/ata/libata-core.c linux-2.6.22-rc1-mm1/drivers/ata/libata-core.c
> --- linux.vanilla-2.6.22-rc1-mm1/drivers/ata/libata-core.c 2007-05-18 16:22:53.000000000 +0100
> +++ linux-2.6.22-rc1-mm1/drivers/ata/libata-core.c 2007-05-18 16:40:23.000000000 +0100
> @@ -3128,7 +3135,10 @@
> if (ata_check_status(ap) == 0xFF)
> return -ENODEV;
>
> - return ata_bus_post_reset(ap, devmask, deadline);
> + if (ap->ops->bus_post_reset)
> + return ap->ops->bus_post_reset(ap, devmask, deadline);
> + else
> + return ata_bus_post_reset(ap, devmask, deadline);
> }
ata_bus_post_reset() is a separate function only because it was written
that way at the beginning. It's really not a separate logical API and I
was thinking of folding it into ata_bus_softreset() or
ata_std_softreset() after old EH is gone. Also it's a bit ugly to call
ap->ops->* from a ap->ops callback. I think the correct solution here
is to write a separate ->softreset method.
Hmmm... I guess what's failing is the nsect==1 && lbal==1 test, right?
Jeff, do we really need that test? dev0 doesn't clear BSY till PDIAG-
is asserted from dev1 anyway. Maybe just limit the waiting there to a
few secs?
--
tejun
next prev parent reply other threads:[~2007-05-21 15:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-21 14:28 [PATCH] libata: Allow a controller specific post bus reset method Alan Cox
2007-05-21 15:10 ` Tejun Heo [this message]
2007-05-21 16:10 ` Alan Cox
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=4651B653.8010201@gmail.com \
--to=htejun@gmail.com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jeff@garzik.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.