Hi, Rafael,
I am using Dell E6410 with same AHCI host controller as your system, but could not reproduce the bug you found out (using Ubuntu 11.04 and 2.6.39-rc6 kernel).
Do you know which config file I need change to perform this testing?
Thanks,
Jian
On Wed, May 18, 2011 at 2:25 PM, Jian Peng <jipeng2005@xxxxxxxxx> wrote:
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 @@- * Even though most AHCI host controllers work without this check,
{
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
- *@@ -1353,6 +1332,8 @@
- * 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);+
ahci_start_engine(ap);
+ msleep(5);
if (online)
*class = ahci_dev_classify(ap);2011/5/18 Rafael J. Wysocki <rjw@xxxxxxx>
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>> <http://lxr.linux.no/linux+*/+code=ap>);
> 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
>Could you simply post a patch?
> Since my host controller requires time to switch internal state to be ready.
> Please let me know your testing result.
Rafael
_______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm