From: Tejun Heo <tj@kernel.org>
To: Jian Peng <jipeng@broadcom.com>
Cc: Robert Hancock <hancockrwd@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"jgarzik@pobox.com" <jgarzik@pobox.com>,
ide <linux-ide@vger.kernel.org>
Subject: Re: questions regarding possible violation of AHCI spec in AHCI driver
Date: Wed, 08 Dec 2010 23:54:03 +0100 [thread overview]
Message-ID: <4D000C8B.5040904@kernel.org> (raw)
In-Reply-To: <E18F441196CA634DB8E1F1C56A50A874319FA38CD3@IRVEXCHCCR01.corp.ad.broadcom.com>
Hello, Jian.
On 12/08/2010 09:09 PM, Jian Peng wrote:
> The controller may take much longer time to recover in this case,
> and leads to wrong HW state after stop_engine() inside
> ahci_hardreset() and cause device type checking failure due to
> unfinished HW state change and missing D2H FIS after start_engine()
> again inside ahci_hardreset(). I guess this is the reason why AHCI
> spec try to emphasize.
I don't necessarily agree there. The requirement is impossible to
reliably satisfy to begin with (it's inherently racy) and most specs
are filled with "the outcome is undefined" when they don't _need_ to
be well defined. The hardware can do "eh.. well, whatever, I don't
know" but shouldn't get lost and fail to react to further
state-resetting actions.
> Yes, without this change, Broadcom controller will fail due to above
> reason.
Okay, so, the controller goes bonkers if ST is set when prerequisites
are not met. You know that the problem can still happen with the
proposed change, right? It's much less likely but definitely can and
actually is likely to happen once in a blue moon. It isn't too
uncommon for link to take some time to stabilize after a PHY event
(including hardreset) and some devices will end up sending multiple
D2H Reg FISes in the process with conflicting status. Also, note that
the delay between the check and ST setting could be substantial
especially with parallel probing / booting.
I'm not objecting to the change but you guys probably want to fix the
controller in following revisions. If we're gonna make the change,
I'd like to go with the previous version without the vendor check.
What is the timeframe for the controller release? Would it be enough
to merge the change during 2.6.38-rc1? After baking it for some time
in 2.6.38, we can propagate the change back through -stable.
Thanks.
--
tejun
next prev parent reply other threads:[~2010-12-08 22:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-07 7:43 questions regarding possible violation of AHCI spec in AHCI driver Jian Peng
2010-12-08 1:54 ` Robert Hancock
2010-12-08 10:07 ` Tejun Heo
2010-12-08 18:14 ` Jian Peng
2010-12-08 18:24 ` Tejun Heo
2010-12-08 18:48 ` Jian Peng
2010-12-08 18:52 ` Tejun Heo
2010-12-08 19:49 ` Jian Peng
2010-12-08 19:55 ` Tejun Heo
2010-12-08 20:09 ` Jian Peng
2010-12-08 22:54 ` Tejun Heo [this message]
2010-12-09 1:30 ` Jian Peng
2011-01-11 18:09 ` Jian Peng
2011-01-11 18:23 ` Tejun Heo
2011-01-11 18:55 ` Jian Peng
2011-01-12 0:45 ` Harik
2011-01-12 0:51 ` Jian Peng
2011-01-19 0:51 ` Jeff Garzik
2011-01-19 0:58 ` Jian Peng
2011-01-19 23:35 ` Jian Peng
2011-01-19 23:37 ` Jian Peng
2011-04-19 21:48 ` Jian Peng
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=4D000C8B.5040904@kernel.org \
--to=tj@kernel.org \
--cc=hancockrwd@gmail.com \
--cc=jgarzik@pobox.com \
--cc=jipeng@broadcom.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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