public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockrwd@gmail.com>
To: Jian Peng <jipeng@broadcom.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jgarzik@pobox.com" <jgarzik@pobox.com>,
	ide <linux-ide@vger.kernel.org>, Tejun Heo <tj@kernel.org>
Subject: Re: questions regarding possible violation of AHCI spec in AHCI driver
Date: Tue, 07 Dec 2010 19:54:49 -0600	[thread overview]
Message-ID: <4CFEE569.4030204@gmail.com> (raw)
In-Reply-To: <E18F441196CA634DB8E1F1C56A50A874319F70C1F2@IRVEXCHCCR01.corp.ad.broadcom.com>

CCing linux-ide and Tejun.

On 12/07/2010 01:43 AM, Jian Peng wrote:
> Recently, while bringing up a new AHCI host controller, I found out that current AHCI driver (in 2.6.37-rc3) may violate AHCI spec in function libahci.c: ahci_start_engine().
>
>  From end of section 10.1.2 in AHCI 1.3 spec, it claims
>
> Software shall not set PxCMD.ST to '1' until it is determined that a functional device is present on the port
> as determined by PxTFD.STS.BSY = '0', PxTFD.STS.DRQ = '0', and PxSSTS.DET = 3h.
>
> It seems working well on most controller without this extra checking, but does cause problem in our new core. Since toggling PxCMD.SUD already initiated reset process at early time, and by the time of ahci_start_engine() got called, BSY bit may not be cleared yet, and forcing PxCMD.ST bit to 1 will cause problem for HW in this case.
>
> Since I do not know all history about AHCI driver, I really hope that AHCI driver and libata maintainer can comment on this.

Seems like a valid point to me, according to the spec. I'm guessing it 
just hasn't come up previously with other controllers?

  reply	other threads:[~2010-12-08  1: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 [this message]
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
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=4CFEE569.4030204@gmail.com \
    --to=hancockrwd@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=jipeng@broadcom.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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