Bug 10619 - [regression] ata2: device not ready (errno=-16), forcing hardreset
Summary: [regression] ata2: device not ready (errno=-16), forcing hardreset
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jeff Garzik
Depends on:
Blocks: 10492
  Show dependency tree
Reported: 2008-05-08 06:49 UTC by Oleksij Rempel (fishor)
Modified: 2008-05-11 14:24 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.26-rc1
Regression: Yes
Bisected commit-id:

dmesg (34.13 KB, text/plain)
2008-05-08 06:50 UTC, Oleksij Rempel (fishor)
lspci (24.15 KB, text/plain)
2008-05-08 06:52 UTC, Oleksij Rempel (fishor)

Description Oleksij Rempel (fishor) 2008-05-08 06:49:06 UTC
[    1.146787] PCI: Setting latency timer of device 0000:00:1f.1 to 64
[    1.146787] scsi0 : ata_piix
[    1.146787] scsi1 : ata_piix
[    1.152149] ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xffa0 irq 14
[    1.152149] ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xffa8 irq 15
[    1.305660] ata1.01: ATAPI: HP      DVD Writer 840b, FF66, max UDMA/33
[    1.311600] ata1.01: configured for UDMA/33
[    6.815205] ata2: link is slow to respond, please be patient (ready=0)
[   12.253365] ata2: device not ready (errno=-16), forcing hardreset
[   18.113797] ata2: link is slow to respond, please be patient (ready=0)
[   22.959853] ata2: SRST failed (errno=-16)
[   28.159854] ata2: link is slow to respond, please be patient (ready=0)
[   33.225104] ata2: SRST failed (errno=-16)
[   38.923079] ata2: link is slow to respond, please be patient (ready=0)
[   72.595753] ata2: SRST failed (errno=-16)
[   78.233188] ata2: SRST failed (errno=-16)
[   78.233229] ata2: reset failed, giving up

Regression introducet by patch:

commit 78ab88f04f44bed566d51dce0c7cbfeff6449a06
Author: Tejun Heo <htejun@gmail.com>
Date:   Thu May 1 23:41:41 2008 +0900

    libata: improve post-reset device ready test
    Some controllers (jmb and inic162x) use 0x77 and 0x7f to indicate that
    the device isn't ready yet.  It looks like they use 0xff if device
    presence is detected but connection isn't established.  0x77 or 0x7f
    after connection is established and use the value from signature FIS
    after receiving it.
    This patch implements ata_check_ready(), which takes TF status value
    and determines whether the port is ready or not considering the above
    and other conditions, and use it in @check_ready() functions.  This is
    safe as both 0x77 and 0x7f aren't valid ready status value even though
    they have BSY bit cleared.
    This fixes hot plug detection failures which can be triggered with
    certain drives if they aren't already spun up when the data connector
    is hot plugged.
    Tested on sil, sil24, ahci (jmb/ich), piix and inic162x combined with
    eight drives from all major vendors.
    Signed-off-by: Tejun Heo <htejun@gmail.com>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Comment 1 Oleksij Rempel (fishor) 2008-05-08 06:50:58 UTC
Created attachment 16064 [details]
Comment 2 Oleksij Rempel (fishor) 2008-05-08 06:52:30 UTC
Created attachment 16065 [details]

Note You need to log in before you can comment on or make changes to this bug.