From: Tejun Heo <htejun@gmail.com>
To: Jose Alberto Reguero <jareguero@telefonica.net>
Cc: Jeff Garzik <jeff@garzik.org>, linux-ide@vger.kernel.org
Subject: Re: Add suport for Marvell 88SE6121 in ahci
Date: Sun, 18 Mar 2007 14:28:26 +0900 [thread overview]
Message-ID: <45FCCDFA.8050800@gmail.com> (raw)
In-Reply-To: <200703161521.29461.jareguero@telefonica.net>
Jose Alberto Reguero wrote:
> I found that the driver work well for Marvel 6121 without the flag
> ATA_FLAG_SKIP_D2H_BSY.
> What is the meaning of this flag?
This is usually meaningful with hotplug. The problem is that, on some
SATA controllers including ahci and sata_sil24, the wait for the first
D2H Reg FIS indicating device readiness isn't reliable. It's supposed
to work like the following (sata_sil behaves pretty good on this regard).
1. User hotplug device to port and PHY event interrupt raised, the
controller should set BSY status bit.
2. libata EH kicks in and waits for BSY to clear (current timeout 30s).
Done by the first D2H Reg FIS. Drives usually send this after spinup
is complete.
3. After BSY is cleared, the device is reset.
The problem with ahci and sata_sil24 is that there really is no TF
status register is non-existent or emulated in some way and they doesn't
let us reliably wait for !BSY after hotplug event. This often makes the
wait in #2 timeout and that's 30 seconds. :-(
So, the flag makes libata EH skip #2. Post-reset waiting is reliable,
so there is no timeout. But this causes problems on some devices (the
Quantum GoVault thing) which takes a looooong time to get ready and
don't respond correctly to phy reset while it's busy initializing.
The flag is there primarily for ICH ahci's. Marvell might be different.
Care to remove SKIP_D2H_BSY and test a LOT of hotplugging with several
different devices? :-)
--
tejun
next prev parent reply other threads:[~2007-03-18 5:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-31 14:04 Add suport for Marvell 88SE6121 in ahci Jose Alberto Reguero
2007-01-31 15:03 ` Jeff Garzik
2007-01-31 16:43 ` Jose Alberto Reguero
2007-03-16 14:21 ` Jose Alberto Reguero
2007-03-18 5:28 ` Tejun Heo [this message]
2007-03-18 12:35 ` Jose Alberto Reguero
2007-03-18 13:48 ` Tejun Heo
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=45FCCDFA.8050800@gmail.com \
--to=htejun@gmail.com \
--cc=jareguero@telefonica.net \
--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 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).