From: Robert Hancock <hancockrwd@gmail.com>
To: Mark Lord <kernel@teksavvy.com>
Cc: Seed <seedrubbish@gmail.com>, Tejun Heo <htejun@gmail.com>,
Jeff Garzik <jgarzik@pobox.com>,
IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: [BUG] libahci returns stale result tf much of the time.
Date: Fri, 24 Sep 2010 17:26:56 -0600 [thread overview]
Message-ID: <4C9D33C0.8050900@gmail.com> (raw)
In-Reply-To: <4C9CA673.4090104@teksavvy.com>
On 09/24/2010 07:24 AM, Mark Lord wrote:
> On 10-09-24 09:11 AM, Mark Lord wrote:
>> On 10-09-24 03:01 AM, Seed wrote:
>>> On Fri, Sep 24, 2010 at 4:27 PM, Mark Lord<kernel@teksavvy.com> wrote:
>>>> The bug seems to be in the libahci code somewhere.
>>>
>>> ahci_qc_fill_rtf seems to be the function converting FIS to result_tf.
>> ..
>>
>> Yeah, that's as far as I got with it last night.
>> If you apply this patch (below), it makes the problem more "obvious",
>> though I still don't see exactly how that struct gets updated.
>>
>> --- a/drivers/ata/libahci.c 2010-09-24 02:40:24.722887047 -0400
>> +++ b/drivers/ata/libahci.c 2010-09-24 09:10:21.761520099 -0400
>> @@ -1838,6 +1838,7 @@
>> d2h_fis += qc->dev->link->pmp * AHCI_RX_FIS_SZ;
>>
>> ata_tf_from_fis(d2h_fis, &qc->result_tf);
>> + memset(d2h_fis, 0xfd, AHCI_RX_FIS_SZ);
>> return true;
>> }
>>
> ..
>
> And here's an example of the bug, which should work (as a demo)
> for most folks out there with the same controller ahci / JMB360:
>
> Here, I'll use hdparm to do a "set acoustic" command
> on a drive which does NOT have the "Acoustic Management" feature set.
> Just look for the fd fd fd strings in the returned data,
> and notice how the final IDENTIFY at the end works, but returns
> bad ATA status 0x51 from the stale result_tf:
The d2h_fis area is supposed to be updated by the controller with the
last FIS received from the device. Maybe this controller just isn't
doing that for some reason?
next prev parent reply other threads:[~2010-09-24 23:26 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-24 5:34 [BUG] libahci returns stale result tf much of the time Mark Lord
2010-09-24 5:49 ` Seed
2010-09-24 6:27 ` Mark Lord
2010-09-24 7:01 ` Seed
2010-09-24 13:11 ` Mark Lord
2010-09-24 13:24 ` Mark Lord
2010-09-24 23:26 ` Robert Hancock [this message]
2010-10-04 9:18 ` Tejun Heo
2010-10-04 17:01 ` Mark Lord
2010-10-04 17:06 ` Mark Lord
2010-10-04 17:31 ` Mark Lord
2010-10-04 18:50 ` Mark Lord
2010-10-04 19:27 ` Jeff Garzik
2010-10-04 19:35 ` Mark Lord
2010-10-04 19:42 ` Jeff Garzik
2010-10-04 19:51 ` Mark Lord
2010-10-05 7:07 ` Tejun Heo
2010-10-05 14:06 ` Mark Lord
2010-10-05 16:06 ` Tejun Heo
2010-10-06 1:00 ` Robert Hancock
2010-10-14 8:53 ` [PATCH #upstream-fixes] libahci: fix result_tf handling after an ATA PIO data-in command Tejun Heo
2010-10-14 21:38 ` Mark Lord
2010-10-15 0:24 ` Robert Hancock
2010-10-15 8:45 ` Tejun Heo
2010-10-15 22:14 ` Mark Lord
2010-10-15 0:32 ` Robert Hancock
2010-10-15 8:45 ` Tejun Heo
2010-10-15 9:00 ` [PATCH UPDATED " 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=4C9D33C0.8050900@gmail.com \
--to=hancockrwd@gmail.com \
--cc=htejun@gmail.com \
--cc=jgarzik@pobox.com \
--cc=kernel@teksavvy.com \
--cc=linux-ide@vger.kernel.org \
--cc=seedrubbish@gmail.com \
/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).