From: Tejun Heo <htejun@gmail.com>
To: Mark Lord <liml@rtr.ca>
Cc: Jeff Garzik <jeff@garzik.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>, Alan Cox <alan@redhat.com>,
IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: libata fails to recover from HSM violation involving DRQ status
Date: Sun, 29 Apr 2007 12:17:55 +0900 [thread overview]
Message-ID: <46340E63.5070209@gmail.com> (raw)
In-Reply-To: <4633BF6D.40902@rtr.ca>
Mark Lord wrote:
> Jeff Garzik wrote:
>>
>> It's not really a good idea for SATA. The "FIFO" often co-emulated by
>> the SATA controller and SATA phy. You just want to kick SATA really
>> hard (i.e. bus reset and friends).
>
> Sure. So why don't we do that now?
We do that. It's just that ata_piix is lacking SControl access so all
we can do is SRST not PHY hardreset. I don't think draining
FIFO/whatever on most SATA controllers would be unnecessary as PHY
hardreset would make most drives forget what they were doing. I thought
SRST would have similar effect. It's supposed to reset the device's HSM
and thus clear DRQ, right? Stuck DRQ after SRST seems odd to me.
One more thing to note is that there might be no way to drain data
safely on non-SFF (ahci/sil24...) interfaces and some controllers lock
the machine up hard when TF registers are accessed in certain unexpected
way (unsurprisingly, sata_nv), so if we do this, it needs to be
configurable per-driver. Another question is how would SATA controllers
emulating TF interface react when data port is polled after a DMA
command. I'm pretty sure many of them would behave erratically.
Anyways, can you try to hack it into ata_bmdma_error_handler() and see
whether it actually works? You can check for AC_ERR_HSM there and drain
data port if DRQ is set. After HSM, ATA_NIEN is set and the port should
be quiescent at that point.
Thanks.
--
tejun
next prev parent reply other threads:[~2007-04-29 3:18 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-28 20:15 libata fails to recover from HSM violation involving DRQ status Mark Lord
2007-04-28 20:18 ` Mark Lord
2007-04-28 20:30 ` Alan Cox
2007-04-28 20:37 ` Jeff Garzik
2007-04-28 20:44 ` Mark Lord
2007-04-28 20:50 ` Jeff Garzik
2007-04-28 21:25 ` Alan Cox
2007-04-28 21:35 ` Mark Lord
2007-04-28 21:38 ` Jeff Garzik
2007-04-28 21:41 ` Mark Lord
2007-04-29 3:17 ` Tejun Heo [this message]
2007-04-29 3:46 ` Jeff Garzik
2007-04-29 7:45 ` Tejun Heo
2007-04-29 3:51 ` Tejun Heo
2007-04-29 11:56 ` Mark Lord
2007-04-29 12:59 ` Mark Lord
2007-04-29 13:13 ` Mark Lord
2007-04-29 16:42 ` Tejun Heo
2007-04-29 16:47 ` Mark Lord
2007-04-29 18:49 ` Mark Lord
2007-04-29 19:05 ` Mark Lord
2007-04-30 0:59 ` Tejun Heo
2007-04-29 19:07 ` Mark Lord
2007-04-30 0:54 ` Tejun Heo
2007-04-30 3:42 ` Mark Lord
2007-04-30 3:58 ` Tejun Heo
2007-04-30 17:47 ` Mark Lord
2007-05-01 0:23 ` Mark Lord
2007-05-01 2:47 ` Tejun Heo
2007-05-01 13:00 ` Mark Lord
2007-05-11 3:33 ` Mark Lord
2007-05-11 3:35 ` Mark Lord
2007-04-29 12:07 ` Mark Lord
2007-04-29 16:36 ` Tejun Heo
2007-04-28 23:56 ` Alan Cox
2007-04-28 22:09 ` Mark Lord
2007-04-29 3:04 ` 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=46340E63.5070209@gmail.com \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=alan@redhat.com \
--cc=jeff@garzik.org \
--cc=liml@rtr.ca \
--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).