ahci: wait for !BSY fails

From: James R. Van Artsdalen <james-freebsd-current_at_jrv.org>
Date: Mon, 06 Jul 2009 13:20:43 -0500
Quick synopsis:

1. The CAM AHCI driver fails for me every time detecting disks waiting
for !BSY.  The ATA driver works every time in the same configuration.
The option ROM for the eSATA card ID's the drive correctly every time.

2. Both a WD 1TB and a Seagate 2TB fail/work the same way.

3. The system under test is a Via VB8001 with Via Nano (Isaiah) CPU in
amd64 mode.  8.0-CURRENT svn 195136 June 28, 2009 with
cam-ata.20090704.patch (other patch versions and -CURRENT revs tried too)

4. The AHCI adapter is a JMicron JMB363-based Syba SD-PEX-JM1A2E card:
this one

http://www.newegg.com/Product/Product.aspx?Item=N82E16816124022

The option ROM does not support RAID and there is no option ROM menu.

5, I've spent a couple of days looking at the code and putting in
debugging to trace the I/Os and I can't find the problem.  The old ATA
and new CAM AHCI drivers are doing the same thing except for some timing
differences, and eliminating those timing differences doesn't seem to help.

Without the AHCI cam-ata.20090704.patch the disk is seen:

atapci0: <JMicron JMB363 SATA300 controller> port
0xac00-0xac07,0xa800-0xa803,0xa400-0xa407,0xa000-0xa003,0x9c00-0x9c0f
mem 0xdfbfe000-0xdfbfffff irq 24 at device 0.0 on pci2
atapci0: Reserved 0x10 bytes for rid 0x20 type 4 at 0x9c00
ioapic1: routing intpin 0 (PCI IRQ 24) to lapic 0 vector 49
atapci0: [MPSAFE]
atapci0: [ITHREAD]
atapci0: Reserved 0x2000 bytes for rid 0x24 type 3 at 0xdfbfe000
atapci0: AHCI called from vendor specific driver
atapci0: AHCI v1.00 controller with 2 3Gbps ports, PM supported
atapci0: Caps: 64bit NCQ ALP AL CLO 3Gbps PM PMD SSC PSC 32cmd 2ports
ata2: <ATA channel 0> on atapci0
ata2: AHCI reset...
ata2: hardware reset ...
ata2: SATA connect time=0ms status=00000113
ata2: ready wait time=12ms
ata2: software reset port 15...
ata2: ready wait time=0ms
ata2: SIGNATURE: 00000101
ata2: AHCI reset done: devices=00000001
ata2: [MPSAFE]
ata2: [ITHREAD]
...
ata2: Identifying devices: 00000001
ata2: New devices: 00000001
ata2-master: pio=PIO4 wdma=WDMA2 udma=UDMA133 cable=40 wire
ad4: 953869MB <WDC WD10EACS-00ZJB0 01.01B01> at ata2-master SATA150
ad4: 1953525168 sectors [1938021C/16H/63S] 16 sectors/interrupt 1 depth
queue
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
GEOM: new disk ad4
ad4: JMicron check1 failed
ad4: Adaptec check1 failed
ad4: LSI (v3) check1 failed
ad4: LSI (v2) check1 failed
ad4: FreeBSD check1 failed


But with the AHCI cam-ata.20090704.patch there is an error:
(note that I increased the !BSY timeout to no avail here)

ahci0: <AHCI controller> port
0xac00-0xac07,0xa800-0xa803,0xa400-0xa407,0xa000-0xa003,0x9c00-0x9c0f
mem 0xdfbfe000-0xdfbfffff irq 24 at device 0.0 on pci2
ahci0: Reserved 0x2000 bytes for rid 0x24 type 3 at 0xdfbfe000
ioapic1: routing intpin 0 (PCI IRQ 24) to lapic 0 vector 49
ahci0: [MPSAFE]
ahci0: [ITHREAD]
ahci0: AHCI v1.00 controller with 2 3Gbps ports, PM supported
ahci0: Caps: 64bit NCQ ALP AL CLO 3Gbps PM PMD SSC PSC 32cmd 2ports
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich0: [MPSAFE]
ahcich0: [ITHREAD]
...
ahcich0: AHCI reset...
ahcich0: hardware reset ...
ahcich0: SATA connect time=0ms status=00000113
ahcich0: port is not ready (timeout 30000ms) tfd = 000000ff
ahcich0: device ready timeout
ahcich0: AHCI reset done: devices=00000001
...
ahcich0: Poll error on slot 1, TFD: 0077
(probe0:ahcich0:0:15:0): Request completed with CAM_ATA_STATUS_ERROR
(probe0:ahcich0:0:15:0): error 5
(probe0:ahcich0:0:15:0): Retries Exhausted
ahcich0: Poll error on slot 2, TFD: 0077
(probe0:ahcich0:0:0:0): Request completed with CAM_ATA_STATUS_ERROR
(probe0:ahcich0:0:0:0): error 5
(probe0:ahcich0:0:0:0): Retries Exhausted
Received on Mon Jul 06 2009 - 16:21:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:51 UTC