linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jian Peng <jipeng2005@gmail.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Valdis.Kletnieks@vt.edu,
	Michael Leun <lkml20100708@newton.leun.net>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-ide@vger.kernel.org, Tejun Heo <tj@kernel.org>,
	Linux PM mailing list <linux-pm@lists.linux-foundation.org>,
	Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [PATCH v2.6.38-rc7] Revert "libata: ahci_start_engine compliant to AHCI spec"
Date: Wed, 18 May 2011 14:25:58 -0700	[thread overview]
Message-ID: <BANLkTimZ9pe-FhkJYHTG1Jx8MUPrMHSFbA@mail.gmail.com> (raw)
In-Reply-To: <201105182144.37713.rjw@sisk.pl>


[-- Attachment #1.1: Type: text/plain, Size: 2333 bytes --]

Sure, Please try this. Thanks,

diff -Naur a/drivers/ata/libahci.c b/drivers/ata/libahci.c
--- a/drivers/ata/libahci.c 2011-05-18 14:23:36.564665643 -0700
+++ b/drivers/ata/libahci.c 2011-05-18 14:24:52.564614378 -0700
@@ -539,27 +539,6 @@
 {
  void __iomem *port_mmio = ahci_port_base(ap);
  u32 tmp;
- u8 status;
-
- status = readl(port_mmio + PORT_TFDATA) & 0xFF;
-
- /*
-  * At end of section 10.1 of AHCI spec (rev 1.3), it states
-  * Software shall not set PxCMD.ST to 1 until it is determined
-  * that a functoinal device is present on the port as determined by
-  * PxTFD.STS.BSY=0, PxTFD.STS.DRQ=0 and PxSSTS.DET=3h
-  *
-  * Even though most AHCI host controllers work without this check,
-  * specific controller will fail under this condition
-  */
- if (status & (ATA_BUSY | ATA_DRQ))
-  return;
- else {
-  ahci_scr_read(&ap->link, SCR_STATUS, &tmp);
-
-  if ((tmp & 0xf) != 0x3)
-   return;
- }

  /* start DMA */
  tmp = readl(port_mmio + PORT_CMD);
@@ -1353,6 +1332,8 @@

  ahci_start_engine(ap);

+ msleep(5);
+
  if (online)
   *class = ahci_dev_classify(ap);


2011/5/18 Rafael J. Wysocki <rjw@sisk.pl>

> On Wednesday, May 18, 2011, Jian Peng wrote:
> > Hi, Valdis/Rafael/Michael,
> >
> > Could you help me test the following change?
> >
> > After reverting 81ca7e4, add 5ms delay as follow since that seems also
> > fixing the issue on my SATA host controller that requires 81ca7e4.
> >
> > In drivers/ata/libahci.c, inside ahci_hardreset() function,
> >
> >
> > 1333 <http://lxr.linux.no/linux+*/drivers/ata/libahci.c#L1333>
> > ahci_start_engine
> > <http://lxr.linux.no/linux+*/+code=ahci_start_engine>(ap
> > <http://lxr.linux.no/linux+*/+code=ap>);
> >
> >             msleep(5);1334
> > <http://lxr.linux.no/linux+*/drivers/ata/libahci.c#L1334>1335
> > <http://lxr.linux.no/linux+*/drivers/ata/libahci.c#L1335>        if
> > (online <http://lxr.linux.no/linux+*/+code=online>)1336
> > <http://lxr.linux.no/linux+*/drivers/ata/libahci.c#L1336>
> >   *class <http://lxr.linux.no/linux+*/+code=class> = ahci_dev_classify
> > <http://lxr.linux.no/linux+*/+code=ahci_dev_classify>(ap
> > <http://lxr.linux.no/linux+*/+code=ap>);
> >
> > Since my host controller requires time to switch internal state to be
> ready.
> > Please let me know your testing result.
>
> Could you simply post a patch?
>
> Rafael
>

[-- Attachment #1.2: Type: text/html, Size: 3825 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2011-05-18 21:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11 22:25 AHCI driver problem on SB700/SB800 w/ Acer Ferrari One Rafael J. Wysocki
2011-05-13 12:37 ` AHCI driver problem on ICH (Re: AHCI driver problem on SB700/SB800 w/ Acer Ferrari One) Michael Leun
2011-05-13 16:56   ` Rafael J. Wysocki
2011-05-13 17:39     ` Tejun Heo
2011-05-13 19:54       ` Michael Leun
2011-05-13 20:20         ` Rafael J. Wysocki
2011-05-13 20:22       ` Rafael J. Wysocki
2011-05-13 20:44         ` Rafael J. Wysocki
2011-05-14  2:08           ` Robert Hancock
2011-05-14 10:18           ` Tejun Heo
2011-05-14 10:28             ` [PATCH v2.6.38-rc7] Revert "libata: ahci_start_engine compliant to AHCI spec" Tejun Heo
2011-05-14 17:47               ` Linus Torvalds
2011-05-14 18:49                 ` Jeff Garzik
2011-05-15  6:19               ` Jian Peng
2011-05-15  9:25                 ` Rafael J. Wysocki
2011-05-15 12:20                   ` Michael Leun
2011-05-16 17:02               ` Valdis.Kletnieks
2011-05-18 19:23                 ` Jian Peng
2011-05-18 19:44                   ` Rafael J. Wysocki
2011-05-18 21:25                     ` Jian Peng [this message]
2011-05-19  0:14                       ` Jian Peng
2011-05-19 10:19                         ` Rafael J. Wysocki
2011-05-19 16:42                           ` Jian Peng
2011-05-19 21:32                             ` Rafael J. Wysocki
2011-05-19 21:57                               ` Jian Peng
2011-05-19 22:03                                 ` Rafael J. Wysocki
2011-05-20 15:40                         ` Valdis.Kletnieks
2011-05-20 15:43                           ` Tejun Heo
2011-05-20 17:02                             ` Jian Peng
2011-05-20 18:25                               ` Valdis.Kletnieks
2011-05-22  2:00                                 ` Jian Peng
2011-05-23 12:13                               ` Tejun Heo
2011-05-24  1:04                                 ` Jian Peng
2011-05-20 18:21                             ` 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=BANLkTimZ9pe-FhkJYHTG1Jx8MUPrMHSFbA@mail.gmail.com \
    --to=jipeng2005@gmail.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=lkml20100708@newton.leun.net \
    --cc=rjw@sisk.pl \
    --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;
as well as URLs for NNTP newsgroup(s).