From: Jeff Garzik <jeff@garzik.org>
To: Tejun Heo <htejun@gmail.com>
Cc: IDE/ATA development list <linux-ide@vger.kernel.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH #upstream-fixes] libata: improve post-reset device ready test
Date: Tue, 06 May 2008 10:17:32 -0400 [thread overview]
Message-ID: <4820687C.4080803@garzik.org> (raw)
In-Reply-To: <4819D6A5.2030309@gmail.com>
Tejun Heo wrote:
> Some controllers (jmb and inic162x) use 0x77 and 0x7f to indicate that
> the device isn't ready yet. It looks like they use 0xff if device
> presence is detected but connection isn't established. 0x77 or 0x7f
> after connection is established and use the value from signature FIS
> after receiving it.
>
> This patch implements ata_check_ready(), which takes TF status value
> and determines whether the port is ready or not considering the above
> and other conditions, and use it in @check_ready() functions. This is
> safe as both 0x77 and 0x7f aren't valid ready status value even though
> they have BSY bit cleared.
>
> This fixes hot plug detection failures which can be triggered with
> certain drives if they aren't already spun up when the data connector
> is hot plugged.
>
> Tested on sil, sil24, ahci (jmb/ich), piix and inic162x combined with
> eight drives from all major vendors.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
> drivers/ata/ahci.c | 4 +---
> drivers/ata/libata-sff.c | 6 +-----
> include/linux/libata.h | 15 +++++++++++++++
> 3 files changed, 17 insertions(+), 8 deletions(-)
applied
prev parent reply other threads:[~2008-05-06 14:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-01 14:41 [PATCH #upstream-fixes] libata: improve post-reset device ready test Tejun Heo
2008-05-06 14:17 ` Jeff Garzik [this message]
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=4820687C.4080803@garzik.org \
--to=jeff@garzik.org \
--cc=alan@lxorguk.ukuu.org.uk \
--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).