2007-05-15 19:00:45

by Robert de Rooy

[permalink] [raw]
Subject: libata pcmcia failure

Hi,

I tried Fedora 7t4 LiveCD on my ThinkPad T41 with a PCMCIA "Dazzle 4in1 Card Adapter", this adapter supports Sony Memorystick, MMC, SD and SmartMedia cards. The card had a 128MB Lexmark MemoryStick installed.

Under windows the adapter works fine, but under Linux I got a bunch of errors in syslog as shown below...
I do not know if it works with the Linux legacy PCMCIA IDE driver.

If I need to retrieve additional information or test something, please let me know.

Linux localhost.localdomain 2.6.20-1.3104.fc7 #1 SMP Sat Apr 21 22:20:43 EDT 2007 i686 i686 i386 GNU/Linux

Socket 0:
product info: " ", "Memory Card Adapter", "", ""
manfid: 0x0045, 0x0401
function: 4 (fixed disk)

May 14 21:46:24 localhost kernel: pccard: PCMCIA card inserted into slot 0
May 14 21:46:24 localhost kernel: cs: memory probe 0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
May 14 21:46:24 localhost kernel: cs: memory probe 0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff 0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff 0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff 0xcfa00000-0xd01fffff
May 14 21:46:24 localhost kernel: pcmcia: registering new device pcmcia0.0
May 14 21:46:25 localhost kernel: ata3: PATA max PIO0 cmd 0x00014100 ctl 0x0001410e bmdma 0x00000000 irq 3
May 14 21:46:25 localhost kernel: scsi3 : pata_pcmcia
May 14 21:46:25 localhost kernel: ATA: abnormal status 0x80 on port 0x00014107
May 14 21:46:25 localhost kernel: ATA: abnormal status 0x80 on port 0x00014107
May 14 21:46:55 localhost kernel: ata3.00: qc timeout (cmd 0x91)
May 14 21:46:55 localhost kernel: ata3.00: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x4)
May 14 21:46:56 localhost kernel: ATA: abnormal status 0x80 on port 0x00014107
May 14 21:46:56 localhost kernel: ATA: abnormal status 0x80 on port 0x00014107
May 14 21:47:26 localhost kernel: ata3.00: qc timeout (cmd 0x91)
May 14 21:47:26 localhost kernel: ata3.00: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x4)
May 14 21:47:26 localhost kernel: ata3.00: limiting speed to UDMA7:PIO5
May 14 21:47:26 localhost kernel: ATA: abnormal status 0x80 on port 0x00014107
May 14 21:47:26 localhost kernel: ATA: abnormal status 0x80 on port 0x00014107
May 14 21:47:56 localhost kernel: ata3.00: qc timeout (cmd 0x91)
May 14 21:47:56 localhost kernel: ata3.00: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x4)
May 14 21:47:57 localhost kernel: ATA: abnormal status 0x80 on port 0x00014107
May 14 21:47:57 localhost udevd-event[3946]: udev_rules_apply_format: unknown format variable '$modalias'



2007-05-17 08:42:43

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata pcmcia failure

I installed the LiveCD to a spare HDD, and updated to the latest kernel
available.
The errors stayed the same, but they took much longer (it seems the
timeouts changed).

Linux localhost.localdomain 2.6.21-1.3149.fc7 #1 SMP Fri May 11 12:12:11
EDT 2007 i686 i686 i386 GNU/Linux

May 16 23:10:42 localhost kernel: pccard: PCMCIA card inserted into slot 0
May 16 23:10:42 localhost kernel: cs: memory probe
0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
May 16 23:10:42 localhost kernel: cs: memory probe
0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
0xcfa00000-0xd01fffff
May 16 23:10:42 localhost kernel: pcmcia: registering new device pcmcia0.0
May 16 23:10:42 localhost kernel: ata3: PATA max PIO0 cmd 0x00014100 ctl
0x0001410e bmdma 0x00000000 irq 3
May 16 23:10:42 localhost kernel: scsi2 : pata_pcmcia
May 16 23:11:43 localhost kernel: ata3.00: qc timeout (cmd 0x91)
May 16 23:11:43 localhost kernel: ata3.00: failed to IDENTIFY
(INIT_DEV_PARAMS failed, err_mask=0x4)
May 16 23:12:44 localhost kernel: ata3.00: qc timeout (cmd 0x91)
May 16 23:12:44 localhost kernel: ata3.00: failed to IDENTIFY
(INIT_DEV_PARAMS failed, err_mask=0x4)
May 16 23:12:44 localhost kernel: ata3.00: limiting speed to UDMA7:PIO5
May 16 23:13:14 localhost kernel: ATA: abnormal status 0x82 on port
0x00014107
May 16 23:13:14 localhost kernel: ATA: abnormal status 0x82 on port
0x00014107
May 16 23:13:44 localhost kernel: ata3.00: qc timeout (cmd 0x91)
May 16 23:13:44 localhost kernel: ata3.00: failed to IDENTIFY
(INIT_DEV_PARAMS failed, err_mask=0x4)

Robert de Rooy wrote:
> Hi,
>
> I tried Fedora 7t4 LiveCD on my ThinkPad T41 with a PCMCIA "Dazzle
> 4in1 Card Adapter", this adapter supports Sony Memorystick, MMC, SD
> and SmartMedia cards. The card had a 128MB Lexmark MemoryStick installed.
>
> Under windows the adapter works fine, but under Linux I got a bunch of
> errors in syslog as shown below...
> I do not know if it works with the Linux legacy PCMCIA IDE driver.
>
> If I need to retrieve additional information or test something, please
> let me know.
>
> Linux localhost.localdomain 2.6.20-1.3104.fc7 #1 SMP Sat Apr 21
> 22:20:43 EDT 2007 i686 i686 i386 GNU/Linux
>
> Socket 0:
> product info: " ", "Memory Card Adapter", "", ""
> manfid: 0x0045, 0x0401
> function: 4 (fixed disk)
>
> May 14 21:46:24 localhost kernel: pccard: PCMCIA card inserted into
> slot 0
> May 14 21:46:24 localhost kernel: cs: memory probe
> 0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
> May 14 21:46:24 localhost kernel: cs: memory probe
> 0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
> 0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
> 0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
> 0xcfa00000-0xd01fffff
> May 14 21:46:24 localhost kernel: pcmcia: registering new device
> pcmcia0.0
> May 14 21:46:25 localhost kernel: ata3: PATA max PIO0 cmd 0x00014100
> ctl 0x0001410e bmdma 0x00000000 irq 3
> May 14 21:46:25 localhost kernel: scsi3 : pata_pcmcia
> May 14 21:46:25 localhost kernel: ATA: abnormal status 0x80 on port
> 0x00014107
> May 14 21:46:25 localhost kernel: ATA: abnormal status 0x80 on port
> 0x00014107
> May 14 21:46:55 localhost kernel: ata3.00: qc timeout (cmd 0x91)
> May 14 21:46:55 localhost kernel: ata3.00: failed to IDENTIFY
> (INIT_DEV_PARAMS failed, err_mask=0x4)
> May 14 21:46:56 localhost kernel: ATA: abnormal status 0x80 on port
> 0x00014107
> May 14 21:46:56 localhost kernel: ATA: abnormal status 0x80 on port
> 0x00014107
> May 14 21:47:26 localhost kernel: ata3.00: qc timeout (cmd 0x91)
> May 14 21:47:26 localhost kernel: ata3.00: failed to IDENTIFY
> (INIT_DEV_PARAMS failed, err_mask=0x4)
> May 14 21:47:26 localhost kernel: ata3.00: limiting speed to UDMA7:PIO5
> May 14 21:47:26 localhost kernel: ATA: abnormal status 0x80 on port
> 0x00014107
> May 14 21:47:26 localhost kernel: ATA: abnormal status 0x80 on port
> 0x00014107
> May 14 21:47:56 localhost kernel: ata3.00: qc timeout (cmd 0x91)
> May 14 21:47:56 localhost kernel: ata3.00: failed to IDENTIFY
> (INIT_DEV_PARAMS failed, err_mask=0x4)
> May 14 21:47:57 localhost kernel: ATA: abnormal status 0x80 on port
> 0x00014107
> May 14 21:47:57 localhost udevd-event[3946]: udev_rules_apply_format:
> unknown format variable '$modalias'
>
>
>

2007-05-17 20:15:26

by Robert de Rooy

[permalink] [raw]
Subject: libata and legacy ide pcmcia failure

I tried 2.6.22rc1-git5 with both the libata pcmcia and the legacy ide
pcmcia support, both failed as can be seen below...

Linux localhost.localdomain 2.6.22-rc1-git5 #5 SMP Thu May 17 21:23:42
CEST 2007 i686 i686 i386 GNU/Linux

** libata **
May 17 21:55:06 localhost kernel: pccard: PCMCIA card inserted into slot 0
May 17 21:55:06 localhost kernel: cs: memory probe
0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
May 17 21:55:06 localhost kernel: cs: memory probe
0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
0xcfa00000-0xd01fffff
May 17 21:55:06 localhost kernel: pcmcia: registering new device pcmcia0.0
May 17 21:55:07 localhost kernel: scsi2 : pata_pcmcia
May 17 21:55:07 localhost kernel: ata3: PATA max PIO0 cmd 0x00014100 ctl
0x0001410e bmdma 0x00000000 irq 0
May 17 21:55:37 localhost kernel: ata3.00: qc timeout (cmd 0x91)
May 17 21:55:37 localhost kernel: ata3.00: failed to IDENTIFY
(INIT_DEV_PARAMS failed, err_mask=0x4)
May 17 21:56:08 localhost kernel: ata3.00: qc timeout (cmd 0x91)
May 17 21:56:08 localhost kernel: ata3.00: failed to IDENTIFY
(INIT_DEV_PARAMS failed, err_mask=0x4)
May 17 21:56:08 localhost kernel: ata3.00: limiting speed to UDMA7:PIO5
May 17 21:56:18 localhost kernel: ata3: SRST failed (errno=-16)
May 17 21:56:28 localhost kernel: ata3: SRST failed (errno=-16)
May 17 21:56:58 localhost kernel: ata3.00: qc timeout (cmd 0x91)
May 17 21:56:58 localhost kernel: ata3.00: failed to IDENTIFY
(INIT_DEV_PARAMS failed, err_mask=0x4)
May 17 21:56:59 localhost udevd-event[2653]: udev_rules_apply_format:
unknown format variable '$modalias'

** legacy ide **
May 17 15:29:25 localhost kernel: pccard: PCMCIA card inserted into slot 0
May 17 15:29:25 localhost kernel: cs: memory probe
0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
May 17 15:29:25 localhost kernel: cs: memory probe
0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
0xcfa00000-0xd01fffff
May 17 15:29:25 localhost kernel: pcmcia: registering new device pcmcia0.0
May 17 15:29:26 localhost kernel: hde: Memory Card Adapter, CFA DISK drive
May 17 15:29:26 localhost kernel: ide2 at 0x4100-0x4107,0x410e on irq 3
May 17 15:29:26 localhost kernel: hde: max request size: 128KiB
May 17 15:29:26 localhost kernel: hde: 253696 sectors (129 MB) w/1KiB
Cache, CHS=991/16/16
May 17 15:29:56 localhost kernel: hde:<4>hde: lost interrupt
May 17 15:30:26 localhost kernel: hde: lost interrupt
May 17 15:31:06 localhost last message repeated 2 times
May 17 15:32:36 localhost last message repeated 3 times

Robert de Rooy wrote:
> I installed the LiveCD to a spare HDD, and updated to the latest
> kernel available.
> The errors stayed the same, but they took much longer (it seems the
> timeouts changed).
>
> Linux localhost.localdomain 2.6.21-1.3149.fc7 #1 SMP Fri May 11
> 12:12:11 EDT 2007 i686 i686 i386 GNU/Linux
>
> May 16 23:10:42 localhost kernel: pccard: PCMCIA card inserted into
> slot 0
> May 16 23:10:42 localhost kernel: cs: memory probe
> 0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
> May 16 23:10:42 localhost kernel: cs: memory probe
> 0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
> 0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
> 0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
> 0xcfa00000-0xd01fffff
> May 16 23:10:42 localhost kernel: pcmcia: registering new device
> pcmcia0.0
> May 16 23:10:42 localhost kernel: ata3: PATA max PIO0 cmd 0x00014100
> ctl 0x0001410e bmdma 0x00000000 irq 3
> May 16 23:10:42 localhost kernel: scsi2 : pata_pcmcia
> May 16 23:11:43 localhost kernel: ata3.00: qc timeout (cmd 0x91)
> May 16 23:11:43 localhost kernel: ata3.00: failed to IDENTIFY
> (INIT_DEV_PARAMS failed, err_mask=0x4)
> May 16 23:12:44 localhost kernel: ata3.00: qc timeout (cmd 0x91)
> May 16 23:12:44 localhost kernel: ata3.00: failed to IDENTIFY
> (INIT_DEV_PARAMS failed, err_mask=0x4)
> May 16 23:12:44 localhost kernel: ata3.00: limiting speed to UDMA7:PIO5
> May 16 23:13:14 localhost kernel: ATA: abnormal status 0x82 on port
> 0x00014107
> May 16 23:13:14 localhost kernel: ATA: abnormal status 0x82 on port
> 0x00014107
> May 16 23:13:44 localhost kernel: ata3.00: qc timeout (cmd 0x91)
> May 16 23:13:44 localhost kernel: ata3.00: failed to IDENTIFY
> (INIT_DEV_PARAMS failed, err_mask=0x4)
>
> Robert de Rooy wrote:
>> Hi,
>>
>> I tried Fedora 7t4 LiveCD on my ThinkPad T41 with a PCMCIA "Dazzle
>> 4in1 Card Adapter", this adapter supports Sony Memorystick, MMC, SD
>> and SmartMedia cards. The card had a 128MB Lexmark MemoryStick
>> installed.
>>
>> Under windows the adapter works fine, but under Linux I got a bunch
>> of errors in syslog as shown below...
>> I do not know if it works with the Linux legacy PCMCIA IDE driver.
>>
>> If I need to retrieve additional information or test something,
>> please let me know.
>>
>> Linux localhost.localdomain 2.6.20-1.3104.fc7 #1 SMP Sat Apr 21
>> 22:20:43 EDT 2007 i686 i686 i386 GNU/Linux
>>
>> Socket 0:
>> product info: " ", "Memory Card Adapter", "", ""
>> manfid: 0x0045, 0x0401
>> function: 4 (fixed disk)
>>
>> May 14 21:46:24 localhost kernel: pccard: PCMCIA card inserted into
>> slot 0
>> May 14 21:46:24 localhost kernel: cs: memory probe
>> 0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
>> May 14 21:46:24 localhost kernel: cs: memory probe
>> 0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
>> 0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
>> 0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
>> 0xcfa00000-0xd01fffff
>> May 14 21:46:24 localhost kernel: pcmcia: registering new device
>> pcmcia0.0
>> May 14 21:46:25 localhost kernel: ata3: PATA max PIO0 cmd 0x00014100
>> ctl 0x0001410e bmdma 0x00000000 irq 3
>> May 14 21:46:25 localhost kernel: scsi3 : pata_pcmcia
>> May 14 21:46:25 localhost kernel: ATA: abnormal status 0x80 on port
>> 0x00014107
>> May 14 21:46:25 localhost kernel: ATA: abnormal status 0x80 on port
>> 0x00014107
>> May 14 21:46:55 localhost kernel: ata3.00: qc timeout (cmd 0x91)
>> May 14 21:46:55 localhost kernel: ata3.00: failed to IDENTIFY
>> (INIT_DEV_PARAMS failed, err_mask=0x4)
>> May 14 21:46:56 localhost kernel: ATA: abnormal status 0x80 on port
>> 0x00014107
>> May 14 21:46:56 localhost kernel: ATA: abnormal status 0x80 on port
>> 0x00014107
>> May 14 21:47:26 localhost kernel: ata3.00: qc timeout (cmd 0x91)
>> May 14 21:47:26 localhost kernel: ata3.00: failed to IDENTIFY
>> (INIT_DEV_PARAMS failed, err_mask=0x4)
>> May 14 21:47:26 localhost kernel: ata3.00: limiting speed to UDMA7:PIO5
>> May 14 21:47:26 localhost kernel: ATA: abnormal status 0x80 on port
>> 0x00014107
>> May 14 21:47:26 localhost kernel: ATA: abnormal status 0x80 on port
>> 0x00014107
>> May 14 21:47:56 localhost kernel: ata3.00: qc timeout (cmd 0x91)
>> May 14 21:47:56 localhost kernel: ata3.00: failed to IDENTIFY
>> (INIT_DEV_PARAMS failed, err_mask=0x4)
>> May 14 21:47:57 localhost kernel: ATA: abnormal status 0x80 on port
>> 0x00014107
>> May 14 21:47:57 localhost udevd-event[3946]: udev_rules_apply_format:
>> unknown format variable '$modalias'
>>
>>
>>
>
>

2007-05-20 11:32:09

by Tejun Heo

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

1. Please apply timing-debug.patch on 2.6.22rc1-git5 or later and report
the log with timestamp as before. Let's see why the timeout has doubled.

2. Does the attached disable-dev_init_params.patch fix your problem?

--
tejun


Attachments:
timing-debug.patch (1.72 kB)
disable-dev_init_params.patch (508.00 B)
Download all attachments

2007-05-20 21:13:28

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Thanks for looking into this!

I tried the patches on 2.6.22rc1-git5. The second patch unfortunately
did not resolve the issue, although it seems to get a bit further. Here
are the logs.

** 2.6.22rc1-git5 + timing-debug.patch
May 20 22:40:49 localhost kernel: pccard: PCMCIA card inserted into slot 0
May 20 22:40:49 localhost kernel: cs: memory probe
0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
May 20 22:40:49 localhost kernel: cs: memory probe
0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
0xcfa00000-0xd01fffff
May 20 22:40:49 localhost kernel: pcmcia: registering new device pcmcia0.0
May 20 22:40:49 localhost kernel: scsi3 : pata_pcmcia
May 20 22:40:49 localhost kernel: ata3: PATA max PIO0 cmd 0x00014100 ctl
0x0001410e bmdma 0x00000000 irq 0
May 20 22:40:49 localhost kernel: ata3: soft resetting port
May 20 22:40:49 localhost kernel: ata3: reset complete
May 20 22:40:49 localhost kernel: ata3.00: issuing IDENTIFY
May 20 22:40:49 localhost kernel: ata3.00: IDENTIFY complete
May 20 22:40:49 localhost kernel: ata3.00: issuing DEV_INIT_PARAMS
May 20 22:41:19 localhost kernel: ata3.00: qc timeout (cmd 0x91)
May 20 22:41:19 localhost kernel: ata3.00: DEV_INIT_PARAMS complete
May 20 22:41:19 localhost kernel: ata3.00: failed to IDENTIFY
(INIT_DEV_PARAMS failed, err_mask=0x4)
May 20 22:41:20 localhost kernel: ata3: soft resetting port
May 20 22:41:30 localhost kernel: ata3: SRST failed (errno=-16)
May 20 22:41:30 localhost kernel: ata3: soft resetting port
May 20 22:41:30 localhost kernel: ata3: reset complete
May 20 22:41:30 localhost kernel: ATA: abnormal status 0xB5 on port
0x00014107
May 20 22:41:30 localhost kernel: ATA: abnormal status 0xB5 on port
0x00014107
May 20 22:41:30 localhost kernel: ata3.00: issuing IDENTIFY
May 20 22:41:30 localhost kernel: ata3.00: IDENTIFY complete
May 20 22:41:30 localhost kernel: ata3.00: issuing DEV_INIT_PARAMS
May 20 22:42:00 localhost kernel: ata3.00: qc timeout (cmd 0x91)
May 20 22:42:00 localhost kernel: ata3.00: DEV_INIT_PARAMS complete
May 20 22:42:00 localhost kernel: ata3.00: failed to IDENTIFY
(INIT_DEV_PARAMS failed, err_mask=0x4)
May 20 22:42:00 localhost kernel: ata3.00: limiting speed to UDMA7:PIO5
May 20 22:42:01 localhost kernel: ata3: soft resetting port
May 20 22:42:01 localhost kernel: ata3: reset complete
May 20 22:42:01 localhost kernel: ata3.00: issuing IDENTIFY
May 20 22:42:01 localhost kernel: ata3.00: IDENTIFY complete
May 20 22:42:01 localhost kernel: ata3.00: issuing DEV_INIT_PARAMS
May 20 22:42:31 localhost kernel: ata3.00: qc timeout (cmd 0x91)
May 20 22:42:31 localhost kernel: ata3.00: DEV_INIT_PARAMS complete
May 20 22:42:31 localhost kernel: ata3.00: failed to IDENTIFY
(INIT_DEV_PARAMS failed, err_mask=0x4)
May 20 22:42:31 localhost kernel: ata3: soft resetting port
May 20 22:42:31 localhost kernel: ata3: reset complete
May 20 22:42:31 localhost kernel: ata3: EH complete
May 20 22:42:32 localhost udevd-event[2541]: udev_rules_apply_format:
unknown format variable '$modalias'

** 2.6.22rc1-git5 + timing-debug.patch + disable-dev_init_params.patch
May 20 23:02:25 localhost kernel: pccard: PCMCIA card inserted into slot 0
May 20 23:02:25 localhost kernel: cs: memory probe
0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
May 20 23:02:25 localhost kernel: cs: memory probe
0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
0xcfa00000-0xd01fffff
May 20 23:02:25 localhost kernel: pcmcia: registering new device pcmcia0.0
May 20 23:02:25 localhost kernel: scsi3 : pata_pcmcia
May 20 23:02:25 localhost kernel: ata3: PATA max PIO0 cmd 0x00014100 ctl
0x0001410e bmdma 0x00000000 irq 0
May 20 23:02:25 localhost kernel: ata3: soft resetting port
May 20 23:02:25 localhost kernel: ata3: reset complete
May 20 23:02:25 localhost kernel: ata3.00: issuing IDENTIFY
May 20 23:02:26 localhost kernel: ata3.00: IDENTIFY complete
May 20 23:02:26 localhost kernel: ata3.00: CFA: Memory Card Adapter,
20011212, max PIO1
May 20 23:02:26 localhost kernel: ata3.00: 253696 sectors, multi 0: LBA
May 20 23:02:56 localhost kernel: ata3.00: qc timeout (cmd 0xef)
May 20 23:02:56 localhost kernel: ata3.00: failed to set xfermode
(err_mask=0x4)
May 20 23:02:56 localhost kernel: ata3: failed to recover some devices,
retrying in 5 secs
May 20 23:03:01 localhost kernel: ata3: soft resetting port
May 20 23:03:11 localhost kernel: ata3: SRST failed (errno=-16)
May 20 23:03:11 localhost kernel: ata3: soft resetting port
May 20 23:03:11 localhost kernel: ata3: reset complete
May 20 23:03:11 localhost kernel: ata3.00: issuing IDENTIFY
May 20 23:03:11 localhost kernel: ata3.00: IDENTIFY complete
May 20 23:03:41 localhost kernel: ata3.00: qc timeout (cmd 0xef)
May 20 23:03:41 localhost kernel: ata3.00: failed to set xfermode
(err_mask=0x4)
May 20 23:03:41 localhost kernel: ata3: failed to recover some devices,
retrying in 5 secs
May 20 23:03:46 localhost kernel: ata3: soft resetting port
May 20 23:03:46 localhost kernel: ata3: reset complete
May 20 23:03:46 localhost kernel: ata3.00: issuing IDENTIFY
May 20 23:03:46 localhost kernel: ata3.00: IDENTIFY complete
May 20 23:04:16 localhost kernel: ata3.00: qc timeout (cmd 0xef)
May 20 23:04:16 localhost kernel: ata3.00: failed to set xfermode
(err_mask=0x4)
May 20 23:04:16 localhost kernel: ata3.00: disabled
May 20 23:04:17 localhost kernel: ata3: EH complete
May 20 23:04:17 localhost udevd-event[2524]: udev_rules_apply_format:
unknown format variable '$modalias'

Tejun Heo wrote:
> 1. Please apply timing-debug.patch on 2.6.22rc1-git5 or later and report
> the log with timestamp as before. Let's see why the timeout has doubled.
>
> 2. Does the attached disable-dev_init_params.patch fix your problem?
>
>

2007-05-21 11:51:21

by Tejun Heo

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Robert de Rooy wrote:
> Thanks for looking into this!
>
> I tried the patches on 2.6.22rc1-git5. The second patch unfortunately
> did not resolve the issue, although it seems to get a bit further. Here
> are the logs.
>
> ** 2.6.22rc1-git5 + timing-debug.patch

Oh I see. The 2.6.22rc1-git5 has new reset sequencing which uses
deadline table so it takes 10sec to fail to first reset try while 2.6.21
needs 30secs. That's where the 20sec difference per each try comes
from, so newer version is better. Great.

> ** 2.6.22rc1-git5 + timing-debug.patch + disable-dev_init_params.patch
> May 20 23:02:26 localhost kernel: ata3.00: 253696 sectors, multi 0: LBA
> May 20 23:02:56 localhost kernel: ata3.00: qc timeout (cmd 0xef)
> May 20 23:02:56 localhost kernel: ata3.00: failed to set xfermode
> (err_mask=0x4)

Hmmm... It doesn't like SETXFERMASK either. Please try the attached patch.

--
tejun


Attachments:
disable-dev_init_param-and-setxfermode-for-CFA.patch (972.00 B)

2007-05-21 12:37:51

by Alan Cox

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

On Mon, May 21, 2007 at 01:50:48PM +0200, Tejun Heo wrote:
> > May 20 23:02:56 localhost kernel: ata3.00: qc timeout (cmd 0xef)
> > May 20 23:02:56 localhost kernel: ata3.00: failed to set xfermode
> > (err_mask=0x4)
>
> Hmmm... It doesn't like SETXFERMASK either. Please try the attached patch.

The CF 1.1 command list is pretty short. Unfortunately the patch you've
given below won't itself cure the problem as some of the newer CF cards do
need SETXFERMASK issuing to do higher PIO modes.

The CFA people also didn't put the CFA version in the ident data. What might
work sanely would be

if (supports_pio == only_pio0 && cfa)

Alan

2007-05-21 12:42:43

by Tejun Heo

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Alan Cox wrote:
> On Mon, May 21, 2007 at 01:50:48PM +0200, Tejun Heo wrote:
>>> May 20 23:02:56 localhost kernel: ata3.00: qc timeout (cmd 0xef)
>>> May 20 23:02:56 localhost kernel: ata3.00: failed to set xfermode
>>> (err_mask=0x4)
>> Hmmm... It doesn't like SETXFERMASK either. Please try the attached patch.
>
> The CF 1.1 command list is pretty short. Unfortunately the patch you've
> given below won't itself cure the problem as some of the newer CF cards do
> need SETXFERMASK issuing to do higher PIO modes.

Yeap, it's a debug patch. What I was thinking was adding a HORKAGE for
the device - e.g. ATA_HORKAGE_NO_SETXFERMODE, but product ID "Memory
Card Adapter" doesn't seem too specific.

> The CFA people also didn't put the CFA version in the ident data. What might
> work sanely would be
>
> if (supports_pio == only_pio0 && cfa)

OIC. I don't really know much about these CFA thingies. If the above
should work for most devices, no objection from me.

--
tejun

2007-05-21 15:11:20

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

This gets a little bit further again, but now I get lots of new errors....

** 2.6.22rc1-git5 + timing-debug.patch + disable-dev_init_param-and-setxfermode-for-CFA.patch

May 21 16:58:06 localhost kernel: pccard: PCMCIA card inserted into slot 0
May 21 16:58:06 localhost kernel: cs: memory probe 0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
May 21 16:58:06 localhost kernel: cs: memory probe 0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff 0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff 0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff 0xcfa00000-0xd01fffff
May 21 16:58:06 localhost kernel: pcmcia: registering new device pcmcia0.0
May 21 16:58:06 localhost kernel: scsi3 : pata_pcmcia
May 21 16:58:06 localhost kernel: ata3: PATA max PIO0 cmd 0x00014100 ctl 0x0001410e bmdma 0x00000000 irq 0
May 21 16:58:06 localhost kernel: ata3: soft resetting port
May 21 16:58:16 localhost kernel: ata3: SRST failed (errno=-16)
May 21 16:58:16 localhost kernel: ata3: soft resetting port
May 21 16:58:17 localhost kernel: ata3: reset complete
May 21 16:58:17 localhost kernel: ata3.00: issuing IDENTIFY
May 21 16:58:17 localhost kernel: ata3.00: IDENTIFY complete
May 21 16:58:17 localhost kernel: ata3.00: CFA: Memory Card Adapter, 20011212, max PIO1
May 21 16:58:17 localhost kernel: ata3.00: 253696 sectors, multi 0: LBA
May 21 16:58:17 localhost kernel: ata3.00: issuing IDENTIFY
May 21 16:58:17 localhost kernel: ata3.00: IDENTIFY complete
May 21 16:58:17 localhost kernel: ata3.00: configured for PIO0
May 21 16:58:17 localhost kernel: ata3: EH complete
May 21 16:58:17 localhost kernel: scsi 3:0:0:0: Direct-Access ATA Memory Card Adap 2001 PQ: 0 ANSI: 5
May 21 16:58:17 localhost kernel: sd 3:0:0:0: [sdd] 253696 512-byte hardware sectors (130 MB)
May 21 16:58:17 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:58:17 localhost kernel: sd 3:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
May 21 16:58:17 localhost kernel: sd 3:0:0:0: [sdd] 253696 512-byte hardware sectors (130 MB)
May 21 16:58:17 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:58:17 localhost kernel: sd 3:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
May 21 16:58:47 localhost kernel: sdd:<3>ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
May 21 16:58:47 localhost kernel: ata3.00: cmd 20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
May 21 16:58:47 localhost kernel: res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
May 21 16:58:47 localhost kernel: ata3: soft resetting port
May 21 16:58:57 localhost kernel: ata3: SRST failed (errno=-16)
May 21 16:58:57 localhost kernel: ata3: soft resetting port
May 21 16:58:57 localhost kernel: ata3: reset complete
May 21 16:58:57 localhost kernel: ATA: abnormal status 0x58 on port 0x00014107
May 21 16:58:57 localhost kernel: ata3.00: issuing IDENTIFY
May 21 16:58:57 localhost kernel: ATA: abnormal status 0x58 on port 0x00014107
May 21 16:58:57 localhost last message repeated 4 times
May 21 16:58:57 localhost kernel: ata3.00: IDENTIFY complete
May 21 16:58:57 localhost kernel: ata3.00: failed to IDENTIFY (I/O error, err_mask=0x2)
May 21 16:58:57 localhost kernel: ata3.00: revalidation failed (errno=-5)
May 21 16:58:57 localhost kernel: ata3: failed to recover some devices, retrying in 5 secs
May 21 16:59:02 localhost kernel: ata3: soft resetting port
May 21 16:59:12 localhost kernel: ata3: SRST failed (errno=-16)
May 21 16:59:12 localhost kernel: ata3: soft resetting port
May 21 16:59:22 localhost kernel: ata3: SRST failed (errno=-16)
May 21 16:59:22 localhost kernel: ata3: soft resetting port
May 21 16:59:23 localhost kernel: ata3: reset complete
May 21 16:59:23 localhost kernel: ATA: abnormal status 0x3B on port 0x00014107
May 21 16:59:23 localhost kernel: ATA: abnormal status 0x3B on port 0x00014107
May 21 16:59:23 localhost kernel: ATA: abnormal status 0x58 on port 0x00014107
May 21 16:59:23 localhost kernel: ata3.00: issuing IDENTIFY
May 21 16:59:23 localhost kernel: ATA: abnormal status 0x58 on port 0x00014107
May 21 16:59:23 localhost last message repeated 4 times
May 21 16:59:23 localhost kernel: ata3.00: IDENTIFY complete
May 21 16:59:23 localhost kernel: ata3.00: failed to IDENTIFY (I/O error, err_mask=0x2)
May 21 16:59:23 localhost kernel: ata3.00: revalidation failed (errno=-5)
May 21 16:59:23 localhost kernel: ata3: failed to recover some devices, retrying in 5 secs
May 21 16:59:28 localhost kernel: ata3: soft resetting port
May 21 16:59:28 localhost kernel: ata3: reset complete
May 21 16:59:28 localhost kernel: ATA: abnormal status 0x58 on port 0x00014107
May 21 16:59:28 localhost kernel: ata3.00: issuing IDENTIFY
May 21 16:59:28 localhost kernel: ATA: abnormal status 0x58 on port 0x00014107
May 21 16:59:28 localhost last message repeated 4 times
May 21 16:59:28 localhost kernel: ata3.00: IDENTIFY complete
May 21 16:59:28 localhost kernel: ata3.00: failed to IDENTIFY (I/O error, err_mask=0x2)
May 21 16:59:28 localhost kernel: ata3.00: revalidation failed (errno=-5)
May 21 16:59:28 localhost kernel: ata3.00: disabled
May 21 16:59:28 localhost kernel: ata3: EH complete
May 21 16:59:28 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:28 localhost kernel: end_request: I/O error, dev sdd, sector 0
May 21 16:59:28 localhost kernel: Buffer I/O error on device sdd, logical block 0
May 21 16:59:28 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:28 localhost kernel: end_request: I/O error, dev sdd, sector 0
May 21 16:59:28 localhost kernel: Buffer I/O error on device sdd, logical block 0
May 21 16:59:28 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:28 localhost kernel: end_request: I/O error, dev sdd, sector 0
May 21 16:59:28 localhost kernel: Buffer I/O error on device sdd, logical block 0
May 21 16:59:28 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:28 localhost kernel: end_request: I/O error, dev sdd, sector 0
May 21 16:59:28 localhost kernel: Buffer I/O error on device sdd, logical block 0
May 21 16:59:28 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:28 localhost kernel: end_request: I/O error, dev sdd, sector 0
May 21 16:59:28 localhost kernel: Buffer I/O error on device sdd, logical block 0
May 21 16:59:28 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:28 localhost kernel: end_request: I/O error, dev sdd, sector 0
May 21 16:59:28 localhost kernel: Buffer I/O error on device sdd, logical block 0
May 21 16:59:28 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:28 localhost kernel: end_request: I/O error, dev sdd, sector 0
May 21 16:59:28 localhost kernel: Buffer I/O error on device sdd, logical block 0
May 21 16:59:28 localhost kernel: Dev sdd: unable to read RDB block 0
May 21 16:59:28 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:28 localhost kernel: end_request: I/O error, dev sdd, sector 0
May 21 16:59:28 localhost kernel: Buffer I/O error on device sdd, logical block 0
May 21 16:59:28 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:28 localhost kernel: end_request: I/O error, dev sdd, sector 0
May 21 16:59:28 localhost kernel: Buffer I/O error on device sdd, logical block 0
May 21 16:59:28 localhost kernel: unable to read partition table
May 21 16:59:28 localhost kernel: sd 3:0:0:0: [sdd] Attached SCSI removable disk
May 21 16:59:28 localhost kernel: sd 3:0:0:0: Attached scsi generic sg3 type 0
May 21 16:59:28 localhost udevd-event[2504]: udev_rules_apply_format: unknown format variable '$modalias'
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:29 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:31 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:31 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:31 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:31 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:31 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:31 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:31 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:31 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:31 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:31 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:31 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:31 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:33 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:33 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:33 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:33 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:33 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:33 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:33 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:33 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:33 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:33 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:33 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:33 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:35 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:35 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:35 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:35 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:35 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:35 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:35 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:35 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:35 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:35 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:35 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:35 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:37 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:37 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:37 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:37 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:37 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:37 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:37 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:37 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:37 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:37 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:37 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:37 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:39 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:39 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:39 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:39 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:39 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:39 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:39 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:39 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:39 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:39 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:39 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:39 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:41 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:41 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:41 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:41 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:41 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:41 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through
May 21 16:59:41 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
May 21 16:59:41 localhost kernel: sd 3:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
May 21 16:59:41 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
May 21 16:59:41 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
May 21 16:59:41 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache data failed
May 21 16:59:41 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive cache: write through

and it continues like that until I pull the card.

Tejun Heo wrote:
> Robert de Rooy wrote:
>
>> Thanks for looking into this!
>>
>> I tried the patches on 2.6.22rc1-git5. The second patch unfortunately
>> did not resolve the issue, although it seems to get a bit further. Here
>> are the logs.
>>
>> ** 2.6.22rc1-git5 + timing-debug.patch
>>
>
> Oh I see. The 2.6.22rc1-git5 has new reset sequencing which uses
> deadline table so it takes 10sec to fail to first reset try while 2.6.21
> needs 30secs. That's where the 20sec difference per each try comes
> from, so newer version is better. Great.
>
>
>> ** 2.6.22rc1-git5 + timing-debug.patch + disable-dev_init_params.patch
>> May 20 23:02:26 localhost kernel: ata3.00: 253696 sectors, multi 0: LBA
>> May 20 23:02:56 localhost kernel: ata3.00: qc timeout (cmd 0xef)
>> May 20 23:02:56 localhost kernel: ata3.00: failed to set xfermode
>> (err_mask=0x4)
>>
>
> Hmmm... It doesn't like SETXFERMASK either. Please try the attached patch.
>
>

2007-05-21 15:18:41

by Tejun Heo

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Robert de Rooy wrote:
> This gets a little bit further again, but now I get lots of new errors....

Alright, this doesn't seem to be the CF reader's problem anymore. It
seems the PCMCIA controller isn't passing interrupts properly. Does any
other device work in the slot?

--
tejun

2007-05-21 16:11:49

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Hmm, good question. I do not have any other PCMCIA device to test.
The only other device I have is a Cardbus Wi-Fi adapter without Linux
support (Marvell). If I insert that adapter lspci seems to list it
properly, but without resorting to ndiswrapper I have no way of testing
it. In any case, seeing how Cardbus is PCI based this is probably
pointless to resolving this issue.

Would any other log data from the controller initialization or lspci help?

Tejun Heo wrote:
> Robert de Rooy wrote:
>
>> This gets a little bit further again, but now I get lots of new errors....
>>
>
> Alright, this doesn't seem to be the CF reader's problem anymore. It
> seems the PCMCIA controller isn't passing interrupts properly. Does any
> other device work in the slot?
>
>

2007-05-21 16:23:14

by Tejun Heo

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Robert de Rooy wrote:
> Hmm, good question. I do not have any other PCMCIA device to test.
> The only other device I have is a Cardbus Wi-Fi adapter without Linux
> support (Marvell). If I insert that adapter lspci seems to list it
> properly, but without resorting to ndiswrapper I have no way of testing
> it. In any case, seeing how Cardbus is PCI based this is probably
> pointless to resolving this issue.
>
> Would any other log data from the controller initialization or lspci help?

Hmmm... I don't really know much about PCMCIA. cc'ing linux-pcmcia.

The original thread can be read from the following URL.

http://thread.gmane.org/gmane.linux.kernel/530099

It seems we're losing interrupts from the CFA device. Any ideas?

Thanks.

--
tejun

2007-05-21 17:17:36

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

00:00.0 Host bridge: Intel Corporation 82855PM Processor to I/O Controller (rev 03)
Subsystem: IBM Thinkpad T41
Flags: bus master, fast devsel, latency 0
Memory at d0000000 (32-bit, prefetchable) [size=256M]
Capabilities: [e4] Vendor Specific Information
Capabilities: [a0] AGP version 2.0
00: 86 80 40 33 06 01 90 20 03 00 00 06 00 00 00 00
10: 08 00 00 d0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 29 05
30: 00 00 00 00 e4 00 00 00 00 00 00 00 00 00 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 02 00 00 00 00 00 00 00 00 00 00 00 27 00 00
60: 10 20 30 40 00 00 00 00 00 00 00 00 00 00 00 00
70: 04 04 00 00 00 00 00 00 00 00 02 2d 71 32 40 30
80: 71 00 80 05 00 00 00 00 00 10 01 00 00 00 00 00
90: 10 11 11 01 30 11 11 00 41 19 00 00 00 1a 7d 00
a0: 02 00 20 00 17 02 00 1f 01 03 00 00 00 00 00 00
b0: 80 00 00 00 00 00 00 00 00 00 f0 37 20 10 00 00
c0: 44 40 50 11 00 80 05 06 00 00 00 00 00 00 00 00
d0: 02 28 00 0e 0b 00 00 30 00 00 31 b5 00 00 02 00
e0: 00 00 00 00 09 a0 04 41 00 00 00 00 00 00 00 00
f0: 00 00 01 00 74 f8 20 80 38 0f 21 00 04 00 00 00

00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP Controller (rev 03) (prog-if 00 [Normal decode])
Flags: bus master, 66MHz, fast devsel, latency 96
Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
I/O behind bridge: 00003000-00003fff
Memory behind bridge: c0100000-c01fffff
Prefetchable memory behind bridge: e0000000-e7ffffff
00: 86 80 41 33 07 01 a0 00 03 00 04 06 00 60 01 00
10: 00 00 00 00 00 00 00 00 00 01 01 40 30 30 a0 22
20: 10 c0 10 c0 00 e0 f0 e7 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0c 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: d4 95 ff 1f 41 f4 09 00 cc 08 94 8c 55 fe 03 00
60: 01 00 00 00 52 48 80 00 b2 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01) (prog-if 00 [UHCI])
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, medium devsel, latency 0, IRQ 11
I/O ports at 1800 [size=32]
00: 86 80 c2 24 05 00 80 02 01 00 03 0c 00 00 80 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 01 18 00 00 00 00 00 00 00 00 00 00 14 10 2d 05
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01) (prog-if 00 [UHCI])
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, medium devsel, latency 0, IRQ 11
I/O ports at 1820 [size=32]
00: 86 80 c4 24 05 00 80 02 01 00 03 0c 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 21 18 00 00 00 00 00 00 00 00 00 00 14 10 2d 05
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 02 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01) (prog-if 00 [UHCI])
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, medium devsel, latency 0, IRQ 11
I/O ports at 1840 [size=32]
00: 86 80 c7 24 05 00 80 02 01 00 03 0c 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 41 18 00 00 00 00 00 00 00 00 00 00 14 10 2d 05
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 03 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01) (prog-if 20 [EHCI])
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, medium devsel, latency 0, IRQ 11
Memory at c0000000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Debug port
00: 86 80 cd 24 06 01 90 02 01 20 03 0c 00 00 00 00
10: 00 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 2e 05
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 04 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 58 c2 c9 00 00 00 00 0a 00 80 20 00 00 00 00
60: 20 20 1f 00 00 00 00 00 01 00 00 00 00 00 08 c0
70: 00 00 c7 0f 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 20 00 3f 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 78 bf 1f 00 88 83 00 00 60 0f 00 00 06 00 00 00

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 81) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=02, subordinate=08, sec-latency=168
I/O behind bridge: 00004000-00008fff
Memory behind bridge: c0200000-cfffffff
Prefetchable memory behind bridge: e8000000-efffffff
00: 86 80 48 24 07 01 80 80 81 00 04 06 00 00 01 00
10: 00 00 00 00 00 00 00 00 00 02 08 a8 40 80 80 22
20: 20 c0 f0 cf 00 e8 f0 ef 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00
40: 02 28 20 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 02 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 10 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 01 00 02 00 00 00 c0 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 2c 4a

00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)
Flags: bus master, medium devsel, latency 0
00: 86 80 cc 24 0f 00 80 02 01 00 01 06 00 00 80 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40: 01 10 00 00 10 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 81 11 00 00 10 00 00 00
60: 0b 0b 0b 0b 92 00 00 00 80 80 80 0b 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: ff fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 24 02 00 00 00 00 00 00 0d 00 00 00 00 00 08 00
b0: 00 00 00 00 00 00 00 00 00 00 02 0a 00 00 00 00
c0: 10 00 00 00 e0 15 00 00 00 00 00 00 0f 00 00 00
d0: 07 28 00 00 02 0f 00 00 04 00 00 00 00 00 00 00
e0: 10 02 00 ff 01 16 0f 3c 33 22 11 00 00 00 67 45
f0: 00 00 00 00 00 00 00 00 60 0f 03 00 00 00 80 00

00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 01) (prog-if 8a [Master SecP PriP])
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, medium devsel, latency 0, IRQ 11
I/O ports at 01f0 [size=8]
I/O ports at 03f4 [size=1]
I/O ports at 0170 [size=8]
I/O ports at 0374 [size=1]
I/O ports at 1860 [size=16]
Memory at 88000000 (32-bit, non-prefetchable) [size=1K]
00: 86 80 ca 24 07 00 80 02 01 8a 01 01 00 00 00 00
10: 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
20: 61 18 00 00 00 00 00 88 00 00 00 00 14 10 2d 05
30: 00 00 00 00 00 00 00 00 00 00 00 00 ff 01 00 00
40: 07 a3 07 a3 00 00 00 00 05 00 01 01 00 00 00 00
50: 00 00 00 00 50 54 00 00 00 00 00 00 00 00 00 00
60: 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)
Subsystem: IBM Thinkpad R50e model 1634
Flags: medium devsel, IRQ 11
I/O ports at 1880 [size=32]
00: 86 80 c3 24 01 00 80 02 01 00 05 0c 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 81 18 00 00 00 00 00 00 00 00 00 00 14 10 2d 05
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 02 00 00
40: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
Subsystem: IBM Thinkpad T41
Flags: bus master, medium devsel, latency 0, IRQ 11
I/O ports at 1c00 [size=256]
I/O ports at 18c0 [size=64]
Memory at c0000c00 (32-bit, non-prefetchable) [size=512]
Memory at c0000800 (32-bit, non-prefetchable) [size=256]
Capabilities: [50] Power Management version 2
00: 86 80 c5 24 07 00 90 02 01 00 01 04 00 00 00 00
10: 01 1c 00 00 c1 18 00 00 00 0c 00 c0 00 08 00 c0
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 37 05
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 02 00 00
40: 09 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 00 c2 c9 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 01) (prog-if 00 [Generic])
Subsystem: IBM Unknown device 0525
Flags: bus master, medium devsel, latency 0, IRQ 11
I/O ports at 2400 [size=256]
I/O ports at 2000 [size=128]
Capabilities: [50] Power Management version 2
00: 86 80 c6 24 05 00 90 02 01 00 03 07 00 00 00 00
10: 01 24 00 00 01 20 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 25 05
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 02 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 00 c2 c9 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R250 [Mobility FireGL 9000] (rev 02) (prog-if 00 [VGA])
Subsystem: IBM Unknown device 0531
Flags: bus master, stepping, fast Back2Back, 66MHz, medium devsel, latency 66, IRQ 11
Memory at e0000000 (32-bit, prefetchable) [size=128M]
I/O ports at 3000 [size=256]
Memory at c0100000 (32-bit, non-prefetchable) [size=64K]
[virtual] Expansion ROM at c0120000 [disabled] [size=128K]
Capabilities: [58] AGP version 2.0
Capabilities: [50] Power Management version 2
00: 02 10 66 4c 87 03 b0 02 02 00 00 03 08 42 00 00
10: 08 00 00 e0 01 30 00 00 00 00 10 c0 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 31 05
30: 00 00 00 00 58 00 00 00 00 00 00 00 0b 01 08 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 31 05
50: 01 00 02 06 00 00 00 00 02 50 20 00 17 02 00 2f
60: 01 03 00 1f 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

02:00.0 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
Subsystem: IBM Unknown device 0552
Flags: bus master, medium devsel, latency 168, IRQ 11
Memory at b0000000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=02, secondary=03, subordinate=06, sec-latency=176
Memory window 0: e8000000-ebfff000 (prefetchable)
Memory window 1: c4000000-c7fff000
I/O window 0: 00004000-000040ff
I/O window 1: 00004400-000044ff
16-bit legacy interface ports at 0001
00: 4c 10 46 ac 07 00 10 02 01 00 07 06 20 a8 82 00
10: 00 00 00 b0 a0 00 00 02 02 03 06 b0 00 00 00 e8
20: 00 f0 ff eb 00 00 00 c4 00 f0 ff c7 00 40 00 00
30: fc 40 00 00 00 44 00 00 fc 44 00 00 0b 01 c0 05
40: 14 10 52 05 01 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 71 d0 40 08 00 00 0a 04 00 00 0f 00 22 1b d2 01
90: c0 02 64 41 00 00 00 00 00 00 00 00 00 00 00 00
a0: 01 00 12 fe 00 00 c0 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

02:00.1 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
Subsystem: IBM Unknown device 0552
Flags: bus master, medium devsel, latency 168, IRQ 11
Memory at b1000000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=02, secondary=07, subordinate=07, sec-latency=176
Memory window 0: ec000000-effff000 (prefetchable)
Memory window 1: c8000000-cbfff000
I/O window 0: 00004800-000048ff
I/O window 1: 00004c00-00004cff
16-bit legacy interface ports at 0001
00: 4c 10 46 ac 07 00 10 02 01 00 07 06 20 a8 82 00
10: 00 00 00 b1 a0 00 00 02 02 07 07 b0 00 00 00 ec
20: 00 f0 ff ef 00 00 00 c8 00 f0 ff cb 00 48 00 00
30: fc 48 00 00 00 4c 00 00 fc 4c 00 00 0b 02 c0 05
40: 14 10 52 05 01 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 71 d0 40 08 00 00 0a 04 00 00 0f 00 22 1b d2 01
90: c0 02 64 41 00 00 00 00 00 00 00 00 00 00 00 00
a0: 01 00 12 fe 00 00 c0 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

02:01.0 Ethernet controller: Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile) (rev 03)
Subsystem: IBM PRO/1000 MT Mobile Connection
Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 11
Memory at c0240000 (32-bit, non-prefetchable) [size=128K]
Memory at c0200000 (32-bit, non-prefetchable) [size=64K]
I/O ports at 8000 [size=64]
[virtual] Expansion ROM at c0220000 [disabled] [size=64K]
Capabilities: [dc] Power Management version 2
00: 86 80 1e 10 17 01 30 02 03 00 00 02 08 40 00 00
10: 00 00 24 c0 00 00 20 c0 01 80 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 22 00 00 00 14 10 49 05
30: 00 00 00 00 dc 00 00 00 00 00 00 00 0b 01 ff 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 22 c8
e0: 00 20 00 14 07 00 02 00 00 00 40 04 00 00 00 00
f0: 05 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00

02:02.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
Subsystem: Unknown device 17ab:8331
Flags: bus master, medium devsel, latency 80, IRQ 11
Memory at c0210000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [44] Power Management version 2
00: 8c 16 14 10 16 01 90 02 01 00 00 02 08 50 00 00
10: 00 00 21 c0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 01 50 00 00 ab 17 31 83
30: 00 00 00 00 44 00 00 00 00 00 00 00 0b 01 0a 1c
40: 00 00 00 00 01 00 02 00 00 40 00 c6 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


Attachments:
pccardctl.txt (223.00 B)
dmesg.txt (33.35 kB)
lspci.txt (19.53 kB)
Download all attachments

2007-05-21 21:12:34

by Jeff Garzik

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Tejun Heo wrote:
> Robert de Rooy wrote:
>> Hmm, good question. I do not have any other PCMCIA device to test.
>> The only other device I have is a Cardbus Wi-Fi adapter without Linux
>> support (Marvell). If I insert that adapter lspci seems to list it
>> properly, but without resorting to ndiswrapper I have no way of testing
>> it. In any case, seeing how Cardbus is PCI based this is probably
>> pointless to resolving this issue.
>>
>> Would any other log data from the controller initialization or lspci help?
>
> Hmmm... I don't really know much about PCMCIA. cc'ing linux-pcmcia.
>
> The original thread can be read from the following URL.
>
> http://thread.gmane.org/gmane.linux.kernel/530099
>
> It seems we're losing interrupts from the CFA device. Any ideas?

Alan probably knows more, but ISTR some CFA PCMCIA devices that needed
polling...

This isn't an ARM platform perchance, is it?

Jeff


2007-05-22 19:37:54

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Jeff Garzik wrote:
> Tejun Heo wrote:
>> Robert de Rooy wrote:
>>> Hmm, good question. I do not have any other PCMCIA device to test.
>>> The only other device I have is a Cardbus Wi-Fi adapter without Linux
>>> support (Marvell). If I insert that adapter lspci seems to list it
>>> properly, but without resorting to ndiswrapper I have no way of testing
>>> it. In any case, seeing how Cardbus is PCI based this is probably
>>> pointless to resolving this issue.
>>>
>>> Would any other log data from the controller initialization or lspci
>>> help?
>>
>> Hmmm... I don't really know much about PCMCIA. cc'ing linux-pcmcia.
>>
>> The original thread can be read from the following URL.
>>
>> http://thread.gmane.org/gmane.linux.kernel/530099
>>
>> It seems we're losing interrupts from the CFA device. Any ideas?
>
> Alan probably knows more, but ISTR some CFA PCMCIA devices that needed
> polling...
>
> This isn't an ARM platform perchance, is it?
>
> Jeff
>
>
>
No, it is a ThinkPad T41 with Intel Pentium M.
I have posted full logs to the list, but the copy to linux-pcmcia got
stuck in moderator approval due to exceeding a 40KB limit.

2007-05-23 13:58:20

by Alan

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

> > http://thread.gmane.org/gmane.linux.kernel/530099
> >
> > It seems we're losing interrupts from the CFA device. Any ideas?
>
> Alan probably knows more, but ISTR some CFA PCMCIA devices that needed
> polling...

Not that I know of. Not devices anyway - there are embedded boxes with no
IRQ configuration for the CF slot but we've never supported those (indeed
there are even people who bitbang ATA on GPIO pins...)

2007-05-23 18:47:41

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Alan Cox wrote:
>>> http://thread.gmane.org/gmane.linux.kernel/530099
>>>
>>> It seems we're losing interrupts from the CFA device. Any ideas?
>>>
>> Alan probably knows more, but ISTR some CFA PCMCIA devices that needed
>> polling...
>>
>
> Not that I know of. Not devices anyway - there are embedded boxes with no
> IRQ configuration for the CF slot but we've never supported those (indeed
> there are even people who bitbang ATA on GPIO pins...)
>
>
So my understanding is, that although some issues with the libata pcmcia
code where found, the latest issue is a pure pcmcia issue?
Anything I can supply or test to further narrow down the problem?
I have already posted lspci -vxxx and full dmesg log to the linux-kernel
list, but here are some select pieces of it....

Yenta: CardBus bridge found at 0000:02:00.0 [1014:0552]
Yenta: Using INTVAL to route CSC interrupts to PCI
Yenta: Routing CardBus interrupts to PCI
Yenta TI: socket 0000:02:00.0, mfunc 0x01d21b22, devctl 0x64
Yenta: ISA IRQ mask 0x04b8, PCI irq 11
Socket status: 30000086
pcmcia: parent PCI bridge I/O window: 0x4000 - 0x8fff
cs: IO port probe 0x4000-0x8fff: clean.
pcmcia: parent PCI bridge Memory window: 0xc0200000 - 0xcfffffff
pcmcia: parent PCI bridge Memory window: 0xe8000000 - 0xefffffff
PM: Adding info for No Bus:pcmcia_socket0
Yenta: CardBus bridge found at 0000:02:00.1 [1014:0552]
Yenta: Using INTVAL to route CSC interrupts to PCI
Yenta: Routing CardBus interrupts to PCI
Yenta TI: socket 0000:02:00.1, mfunc 0x01d21b22, devctl 0x64
Yenta: ISA IRQ mask 0x04b8, PCI irq 11
Socket status: 30000086
pcmcia: parent PCI bridge I/O window: 0x4000 - 0x8fff
cs: IO port probe 0x4000-0x8fff: clean.
pcmcia: parent PCI bridge Memory window: 0xc0200000 - 0xcfffffff
pcmcia: parent PCI bridge Memory window: 0xe8000000 - 0xefffffff
PM: Adding info for No Bus:pcmcia_socket1

cs: IO port probe 0x100-0x3af: clean.
cs: IO port probe 0x3e0-0x4ff: excluding 0x4d0-0x4d7
cs: IO port probe 0x820-0x8ff: clean.
cs: IO port probe 0xc00-0xcf7 clean.
cs: IO port probe 0xa00-0xaff: clean.
cs: IO port probe 0x100-0x3af: clean.
cs: IO port probe 0x3e0-0x4ff: excluding 0x4d0-0x4d7
cs: IO port probe 0x820-0x8ff: clean.
cs: IO port probe 0xc00-0xcf7: clean.
cs: IO port probe 0xa00-0xaff: clean.

02:00.0 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus
Controller (rev 01)

Subsystem: IBM Unknown device 0552
Flags: bus master, medium devsel, latency 168, IRQ 11
Memory at b0000000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=02, secondary=03, subordinate=06, sec-latency=176
Memory window 0: e8000000-ebfff000 (prefetchable)
Memory window 1: c4000000-c7fff000
I/O window 0: 00004000-000040ff
I/O window 1: 00004400-000044ff
16-bit legacy interface ports at 0001
00: 4c 10 46 ac 07 00 10 02 01 00 07 06 20 a8 82 00
10: 00 00 00 b0 a0 00 00 02 02 03 06 b0 00 00 00 e8
20: 00 f0 ff eb 00 00 00 c4 00 f0 ff c7 00 40 00 00
30: fc 40 00 00 00 44 00 00 fc 44 00 00 0b 01 c0 05
40: 14 10 52 05 01 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 71 d0 40 08 00 00 0a 04 00 00 0f 00 22 1b d2 01
90: c0 02 64 41 00 00 00 00 00 00 00 00 00 00 00 00
a0: 01 00 12 fe 00 00 c0 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

02:00.1 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus
Controller (rev 01)
Subsystem: IBM Unknown device 0552
Flags: bus master, medium devsel, latency 168, IRQ 11
Memory at b1000000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=02, secondary=07, subordinate=07, sec-latency=176
Memory window 0: ec000000-effff000 (prefetchable)
Memory window 1: c8000000-cbfff000
I/O window 0: 00004800-000048ff
I/O window 1: 00004c00-00004cff
16-bit legacy interface ports at 0001
00: 4c 10 46 ac 07 00 10 02 01 00 07 06 20 a8 82 00
10: 00 00 00 b1 a0 00 00 02 02 07 07 b0 00 00 00 ec
20: 00 f0 ff ef 00 00 00 c8 00 f0 ff cb 00 48 00 00
30: fc 48 00 00 00 4c 00 00 fc 4c 00 00 0b 02 c0 05
40: 14 10 52 05 01 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 71 d0 40 08 00 00 0a 04 00 00 0f 00 22 1b d2 01
90: c0 02 64 41 00 00 00 00 00 00 00 00 00 00 00 00
a0: 01 00 12 fe 00 00 c0 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

2007-06-06 20:27:52

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Alan Cox wrote:
>>> http://thread.gmane.org/gmane.linux.kernel/530099
>>>
>>> It seems we're losing interrupts from the CFA device. Any ideas?
>>>
>> Alan probably knows more, but ISTR some CFA PCMCIA devices that needed
>> polling...
>>
>
> Not that I know of. Not devices anyway - there are embedded boxes with no
> IRQ configuration for the CF slot but we've never supported those (indeed
> there are even people who bitbang ATA on GPIO pins...)
>
>
I was able to test the same PCMCIA adapter in a different ThinkPad, an X40.
The X40 also fails although it has a totally different Cardbus
controller (TI on the T40 vs Ricoh on the X40)

Here is the log from the X40 running the same kernel as before
(2.6.22rc1-git5 + timing-debug.patch +
disable-dev_init_param-and-setxfermode-for-CFA.patch)

pccard: PCMCIA card inserted into slot 0
pcmcia: registering new device pcmcia0.0
Jun 6 22:10:21 localhost kernel: pccard: PCMCIA card inserted into slot 0
Jun 6 22:10:21 localhost kernel: cs: memory probe
0xf0000000-0xf7ffffff: excluding 0xf0000000-0xf7ffffff
Jun 6 22:10:21 localhost kernel: cs: memory probe
0xd0200000-0xdfffffff: excluding 0xd0200000-0xd11fffff
0xd1a00000-0xd21fffff 0xd2a00000-0xd31fffff 0xd3a00000-0xd81fffff
0xd8a00000-0xd91fffff 0xd9a00000-0xda1fffff 0xdaa00000-0xdb1fffff
0xdba00000-0xdc1fffff 0xdca00000-0xdd1fffff 0xdda00000-0xde1fffff
0xdea00000-0xdf1fffff 0xdfa00000-0xe01fffff
Jun 6 22:10:21 localhost kernel: pcmcia: registering new device pcmcia0.0
Jun 6 22:10:21 localhost kernel: scsi3 : pata_pcmcia
Jun 6 22:10:21 localhost kernel: ata3: PATA max PIO0 cmd 0x00013100 ctl
0x0001310e bmdma 0x00000000 irq 0
Jun 6 22:10:21 localhost kernel: ata3: soft resetting port
Jun 6 22:10:32 localhost kernel: ata3: SRST failed (errno=-16)
Jun 6 22:10:32 localhost kernel: ata3: soft resetting port
Jun 6 22:10:42 localhost kernel: ata3: SRST failed (errno=-16)
Jun 6 22:10:42 localhost kernel: ata3: soft resetting port
ata3: SRST failed (errno=-16)
Jun 6 22:11:17 localhost kernel: ata3: SRST failed (errno=-16)
Jun 6 22:11:17 localhost kernel: ata3: soft resetting port
ata3: SRST failed (errno=-16)
ata3: reset failed, giving up
Jun 6 22:11:22 localhost kernel: ata3: SRST failed (errno=-16)
Jun 6 22:11:22 localhost kernel: ata3: reset failed, giving up
Jun 6 22:11:22 localhost kernel: ata3: EH complete
Jun 6 22:11:22 localhost udevd-event[2459]: udev_rules_apply_format:
unknown format variable '$modalias'

And here is the lspci data from the X40

00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV
Processor to I/O Controller (rev 02)
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, fast devsel, latency 0
Memory at <unassigned> (32-bit, prefetchable)
Capabilities: [40] Vendor Specific Information
00: 86 80 80 35 06 01 90 20 02 00 00 06 00 00 80 00
10: 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 5c 05
30: 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00
40: 09 00 05 81 00 00 00 00 00 00 c1 fe 02 28 00 0e
50: 00 01 34 00 10 00 00 00 00 10 11 11 00 30 11 11
60: 0a 79 00 02 00 00 08 00 00 00 00 00 00 00 00 00
70: 02 09 00 00 56 60 00 02 01 00 80 00 00 00 00 00
80: 02 00 00 66 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 02 00 20 00 17 02 00 1f 01 00 00 00 00 00 00 00
b0: 00 00 f0 eb 00 00 00 00 00 00 00 00 20 10 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 02 00 06 01 00 00

00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV
Processor to I/O Controller (rev 02)
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, fast devsel, latency 0
00: 86 80 84 35 06 00 80 00 02 00 80 08 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 5d 05
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40: 04 08 18 28 00 00 00 00 00 00 00 00 00 00 00 00
50: 11 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 05 42 00 2a 00 00 00 00 00 00 c0 10 00 00 00 00
70: 75 99 00 20 01 00 00 00 74 e9 1f 00 00 00 00 00
80: 69 00 af 00 bc 01 00 00 10 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 b9 19 12 04 b7 0a 00 00
a0: ff 52 05 30 00 00 00 00 98 87 00 00 a1 b4 20 00
b0: 00 00 00 00 00 00 00 00 84 59 00 00 66 02 9d 04
c0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV
Processor to I/O Controller (rev 02)
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, fast devsel, latency 0
00: 86 80 85 35 06 00 80 00 02 00 80 08 00 00 80 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 5e 05
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40: 04 04 00 00 00 00 11 11 3c 51 65 0b 50 64 0b 51
50: 65 0b 00 00 00 00 00 00 01 08 39 2d 35 33 03 0b
60: 00 00 00 00 00 00 00 00 04 04 00 00 31 3e 00 00
70: 00 00 00 00 04 04 41 27 e7 c7 0f 46 27 12 84 02
80: ff 1f 00 00 ef 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 80 13 1f 00 00 00 00
b0: 00 00 00 00 80 02 00 00 00 00 00 00 00 00 00 00
c0: 07 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 01 00 21 02 00 00 00 00 08 c3 00 ff 25 00 00 00
e0: 2a 00 27 00 da 00 a7 00 00 00 00 00 00 04 00 00
f0: 00 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00

00:02.0 VGA compatible controller: Intel Corporation 82852/855GM
Integrated Graphics Device (rev 02) (prog-if 00 [VGA])
Subsystem: IBM Unknown device 0557
Flags: fast devsel, IRQ 11
Memory at e0000000 (32-bit, prefetchable) [size=128M]
Memory at d0000000 (32-bit, non-prefetchable) [size=512K]
I/O ports at 1800 [size=8]
Capabilities: [d0] Power Management version 1
00: 86 80 82 35 03 00 90 00 02 00 00 03 00 00 80 00
10: 08 00 00 e0 00 00 00 d0 01 18 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 57 05
30: 00 00 00 00 d0 00 00 00 00 00 00 00 0b 01 00 00
40: 09 00 05 81 00 40 00 00 00 00 00 00 00 00 00 00
50: 00 01 34 00 10 00 00 00 00 00 02 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: ff 52 05 30 00 00 00 00 e8 88 00 00 29 c5 20 00
b0: 00 00 00 00 00 00 00 00 5c 5a 00 00 fa e4 9e 04
c0: 07 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 01 00 21 02 00 00 00 00 08 c3 00 ff 25 00 00 00
e0: 2a 00 27 00 da 00 a7 00 00 00 00 00 00 04 00 00
f0: 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00

00:02.1 Display controller: Intel Corporation 82852/855GM Integrated
Graphics Device (rev 02)
Subsystem: IBM Unknown device 0557
Flags: fast devsel
Memory at e8000000 (32-bit, prefetchable) [size=128M]
Memory at d0080000 (32-bit, non-prefetchable) [size=512K]
Capabilities: [d0] Power Management version 1
00: 86 80 82 35 03 00 90 00 02 00 80 03 00 00 80 00
10: 08 00 00 e8 00 00 08 d0 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 57 05
30: 00 00 00 00 d0 00 00 00 00 00 00 00 00 00 00 00
40: 09 00 05 81 00 40 00 00 00 00 00 00 00 00 00 00
50: 00 01 34 00 10 00 00 00 00 00 02 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: ff 52 05 30 00 00 00 00 4a 89 00 00 83 cc 20 00
b0: 00 00 00 00 00 00 00 00 90 5a 00 00 11 dc 9f 04
c0: 07 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 01 00 21 02 00 00 00 00 08 c3 00 ff 25 00 00 00
e0: 2a 00 27 00 da 00 a7 00 00 00 00 00 00 04 00 00
f0: 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00

00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM
(ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01) (prog-if 00 [UHCI])
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, medium devsel, latency 0, IRQ 16
I/O ports at 1820 [size=32]
00: 86 80 c2 24 05 00 80 02 01 00 03 0c 00 00 80 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 21 18 00 00 00 00 00 00 00 00 00 00 14 10 2d 05
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM
(ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01) (prog-if 00 [UHCI])
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, medium devsel, latency 0, IRQ 18
I/O ports at 1840 [size=32]
00: 86 80 c4 24 05 00 80 02 01 00 03 0c 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 41 18 00 00 00 00 00 00 00 00 00 00 14 10 2d 05
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 02 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM
(ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01) (prog-if 00 [UHCI])
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, medium devsel, latency 0, IRQ 19
I/O ports at 1860 [size=32]
00: 86 80 c7 24 05 00 80 02 01 00 03 0c 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 61 18 00 00 00 00 00 00 00 00 00 00 14 10 2d 05
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 03 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2
EHCI Controller (rev 01) (prog-if 20 [EHCI])
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, medium devsel, latency 0, IRQ 20
Memory at d0100000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Debug port
00: 86 80 cd 24 06 01 90 02 01 20 03 0c 00 00 00 00
10: 00 00 10 d0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 2e 05
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 04 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 58 c2 c9 00 80 00 00 0a 00 80 20 00 00 00 00
60: 20 20 1f 00 00 00 00 00 01 00 00 00 00 00 08 c0
70: 00 00 df 0f 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3f 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 78 bf 1f 00 88 83 00 00 60 0f 00 00 06 00 00 00

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 81)
(prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=02, subordinate=05, sec-latency=64
I/O behind bridge: 00003000-00007fff
Memory behind bridge: d0200000-dfffffff
Prefetchable memory behind bridge: f0000000-f7ffffff
00: 86 80 48 24 07 01 80 80 81 00 04 06 00 00 01 00
10: 00 00 00 00 00 00 00 00 00 02 05 40 30 70 80 22
20: 20 d0 f0 df 00 f0 f0 f7 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00
40: 02 28 20 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 02 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 86 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 10 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 01 00 02 00 00 00 c0 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 4e 32

00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface
Bridge (rev 01)
Flags: bus master, medium devsel, latency 0
00: 86 80 cc 24 0f 00 80 02 01 00 01 06 00 00 80 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40: 01 10 00 00 10 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 81 11 00 00 10 00 00 00
60: 8b 8b 8b 8b 92 00 00 00 8b 8b 80 8b 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: ff fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 24 02 00 00 00 00 00 00 12 00 00 00 00 00 08 00
b0: 00 00 00 00 00 00 00 00 00 00 02 0a 00 00 00 00
c0: 10 00 00 00 e0 15 00 00 00 00 00 00 0f 00 00 00
d0: 87 69 20 00 02 0f 00 00 04 00 00 00 00 00 00 00
e0: 10 02 00 ff 01 16 07 3c 33 22 11 00 81 16 67 45
f0: 00 00 00 00 00 00 00 00 60 0f 03 00 00 00 80 00

00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE
Controller (rev 01) (prog-if 8a [Master SecP PriP])
Subsystem: IBM Thinkpad R50e model 1634
Flags: bus master, medium devsel, latency 0, IRQ 19
I/O ports at 01f0 [size=8]
I/O ports at 03f4 [size=1]
I/O ports at 0170 [size=8]
I/O ports at 0374 [size=1]
I/O ports at 1810 [size=16]
Memory at 60000000 (32-bit, non-prefetchable) [size=1K]
00: 86 80 ca 24 07 00 80 02 01 8a 01 01 00 00 00 00
10: 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
20: 11 18 00 00 00 00 00 60 00 00 00 00 14 10 2d 05
30: 00 00 00 00 00 00 00 00 00 00 00 00 ff 01 00 00
40: 07 a3 07 a3 00 00 00 00 05 00 01 01 00 00 00 00
50: 00 00 00 00 50 54 00 00 00 00 00 00 00 00 00 00
60: 08 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M)
SMBus Controller (rev 01)
Subsystem: IBM Thinkpad R50e model 1634
Flags: medium devsel, IRQ 17
I/O ports at 1880 [size=32]
00: 86 80 c3 24 01 00 80 02 01 00 05 0c 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 81 18 00 00 00 00 00 00 00 00 00 00 14 10 2d 05
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 02 00 00
40: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM
(ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
Subsystem: IBM Unknown device 0558
Flags: bus master, medium devsel, latency 0, IRQ 17
I/O ports at 1c00 [size=256]
I/O ports at 18c0 [size=64]
Memory at d0100c00 (32-bit, non-prefetchable) [size=512]
Memory at d0100800 (32-bit, non-prefetchable) [size=256]
Capabilities: [50] Power Management version 2
00: 86 80 c5 24 07 00 90 02 01 00 01 04 00 00 00 00
10: 01 1c 00 00 c1 18 00 00 00 0c 10 d0 00 08 10 d0
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 58 05
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 02 00 00
40: 09 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 00 c2 c9 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M)
AC'97 Modem Controller (rev 01) (prog-if 00 [Generic])
Subsystem: IBM Unknown device 055a
Flags: bus master, medium devsel, latency 0, IRQ 17
I/O ports at 2400 [size=256]
I/O ports at 2000 [size=128]
Capabilities: [50] Power Management version 2
00: 86 80 c6 24 05 00 90 02 01 00 03 07 00 00 00 00
10: 01 24 00 00 01 20 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 5a 05
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 02 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 00 c2 c9 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 60 0f 00 00 00 00 00 00

02:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 8d)
Subsystem: IBM Unknown device 0555
Flags: bus master, medium devsel, latency 168, IRQ 16
Memory at b0000000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=02, secondary=03, subordinate=04, sec-latency=176
Memory window 0: f0000000-f3fff000 (prefetchable)
Memory window 1: d4000000-d7fff000
I/O window 0: 00003000-000030ff
I/O window 1: 00003400-000034ff
16-bit legacy interface ports at 0001
00: 80 11 76 04 07 00 10 02 8d 00 07 06 00 a8 82 00
10: 00 00 00 b0 dc 00 00 02 02 03 04 b0 00 00 00 f0
20: 00 f0 ff f3 00 00 00 d4 00 f0 ff d7 00 30 00 00
30: fc 30 00 00 00 34 00 00 fc 34 00 00 0b 01 80 05
40: 14 10 55 05 01 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 01 00 80 04 00 03 00 00 64 04 63 04 01 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 8a 00 00 00 00 00 00 00 f0 00 00 00 00 00
b0: 00 00 00 00 00 00 00 36 00 38 00 00 00 00 00 00
c0: 14 10 55 05 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 0a fe
e0: 00 40 c0 24 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

02:00.1 Generic system peripheral [0805]: Ricoh Co Ltd R5C822
SD/SDIO/MMC/MS/MSPro Host Adapter (rev 13)
Subsystem: IBM Thinkpad X40
Flags: bus master, medium devsel, latency 64, IRQ 17
Memory at d0221000 (32-bit, non-prefetchable) [size=256]
Capabilities: [80] Power Management version 2
00: 80 11 22 08 06 01 10 02 13 00 05 08 00 40 80 00
10: 00 10 22 d0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 56 05
30: 00 00 00 00 80 00 00 00 00 00 00 00 0b 02 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 01 00 02 fe 00 40 00 48 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 56 05
b0: 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: a1 21 80 01 00 00 00 00 40 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 03 00 20 04 00 00 00 00

02:01.0 Ethernet controller: Intel Corporation 82541GI Gigabit Ethernet
Controller
Subsystem: IBM Unknown device 055b
Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 21
Memory at d0200000 (32-bit, non-prefetchable) [size=128K]
I/O ports at 7000 [size=64]
Capabilities: [dc] Power Management version 2
Capabilities: [e4] PCI-X non-bridge device
00: 86 80 77 10 17 01 30 02 00 00 00 02 08 40 00 00
10: 00 00 20 d0 00 00 00 00 01 70 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 14 10 5b 05
30: 00 00 00 00 dc 00 00 00 00 00 00 00 0b 01 ff 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 01 e4 22 c8
e0: 00 20 00 14 07 00 02 00 00 00 40 00 00 00 00 00
f0: 05 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00

02:02.0 Network controller: Intel Corporation PRO/Wireless 2200BG
Network Connection (rev 05)
Subsystem: Intel Corporation Unknown device 2711
Flags: bus master, medium devsel, latency 64, IRQ 22
Memory at d0220000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [dc] Power Management version 2
00: 86 80 20 42 16 01 90 02 05 00 80 02 08 40 00 00
10: 00 00 22 d0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 86 80 11 27
30: 00 00 00 00 dc 00 00 00 00 00 00 00 0b 01 03 18
40: 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 22 c8
e0: 00 20 00 13 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


2007-06-07 07:38:50

by Tejun Heo

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Robert de Rooy wrote:
> Alan Cox wrote:
>>>> http://thread.gmane.org/gmane.linux.kernel/530099
>>>>
>>>> It seems we're losing interrupts from the CFA device. Any ideas?
>>>>
>>> Alan probably knows more, but ISTR some CFA PCMCIA devices that
>>> needed polling...
>>>
>>
>> Not that I know of. Not devices anyway - there are embedded boxes with no
>> IRQ configuration for the CF slot but we've never supported those (indeed
>> there are even people who bitbang ATA on GPIO pins...)
>>
>>
> I was able to test the same PCMCIA adapter in a different ThinkPad, an X40.
> The X40 also fails although it has a totally different Cardbus
> controller (TI on the T40 vs Ricoh on the X40)
>
> Here is the log from the X40 running the same kernel as before
> (2.6.22rc1-git5 + timing-debug.patch +
> disable-dev_init_param-and-setxfermode-for-CFA.patch)

Can you test the attached patch?

--
tejun


Attachments:
libata-dont-test-slave-register-readiness-after-srst.patch (1.13 kB)

2007-06-07 19:22:28

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Tejun Heo wrote:
> Can you test the attached patch
Here is what I get on the T41 (TI Cardbus controller) with 2.6.22-rc4 +
timing-debug.patch +
disable-dev_init_param-and-setxfermode-for-CFA.patch +
libata-dont-test-slave-register-readiness-after-srst.patch

Jun 7 21:10:28 localhost kernel: pccard: PCMCIA card inserted into slot 0
Jun 7 21:10:28 localhost kernel: cs: memory probe
0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
Jun 7 21:10:28 localhost kernel: cs: memory probe
0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
0xcfa00000-0xd01fffff
Jun 7 21:10:28 localhost kernel: pcmcia: registering new device pcmcia0.0
Jun 7 21:10:28 localhost kernel: scsi3 : pata_pcmcia
Jun 7 21:10:28 localhost kernel: ata3: PATA max PIO0 cmd 0x00014100 ctl
0x0001410e bmdma 0x00000000 irq 0
Jun 7 21:10:28 localhost kernel: ata3: soft resetting port
Jun 7 21:10:28 localhost kernel: ata3: reset complete
Jun 7 21:10:28 localhost kernel: ATA: abnormal status 0x80 on port
0x00014107
Jun 7 21:10:28 localhost kernel: ATA: abnormal status 0x80 on port
0x00014107
Jun 7 21:10:28 localhost kernel: ata3.00: issuing IDENTIFY
Jun 7 21:10:29 localhost kernel: ata3.00: IDENTIFY complete
Jun 7 21:10:29 localhost kernel: ata3.00: CFA: Memory Card Adapter,
20011212, max PIO1
Jun 7 21:10:29 localhost kernel: ata3.00: 253696 sectors, multi 0: LBA
Jun 7 21:10:29 localhost kernel: ata3.00: issuing IDENTIFY
Jun 7 21:10:29 localhost kernel: ata3.00: IDENTIFY complete
Jun 7 21:10:29 localhost kernel: ata3.00: configured for PIO0
Jun 7 21:10:29 localhost kernel: ata3: EH complete
Jun 7 21:10:29 localhost kernel: scsi 3:0:0:0: Direct-Access
ATA Memory Card Adap 2001 PQ: 0 ANSI: 5
Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] 253696 512-byte
hardware sectors (130 MB)
Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] Write cache:
disabled, read cache: enabled, doesn't support DPO or FUA
Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] 253696 512-byte
hardware sectors (130 MB)
Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] Write cache:
disabled, read cache: enabled, doesn't support DPO or FUA
Jun 7 21:10:59 localhost kernel: sdd:<3>ata3.00: exception Emask 0x0
SAct 0x0 SErr 0x0 action 0x2 frozen
Jun 7 21:10:59 localhost kernel: ata3.00: cmd
20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
Jun 7 21:10:59 localhost kernel: res
40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Jun 7 21:10:59 localhost kernel: ata3: soft resetting port
Jun 7 21:10:59 localhost kernel: ata3: reset complete
Jun 7 21:10:59 localhost kernel: ATA: abnormal status 0x80 on port
0x00014107
Jun 7 21:10:59 localhost kernel: ATA: abnormal status 0x80 on port
0x00014107
Jun 7 21:10:59 localhost kernel: ATA: abnormal status 0x58 on port
0x00014107
Jun 7 21:10:59 localhost kernel: ata3.00: issuing IDENTIFY
Jun 7 21:10:59 localhost kernel: ATA: abnormal status 0x58 on port
0x00014107
Jun 7 21:10:59 localhost last message repeated 4 times
Jun 7 21:10:59 localhost kernel: ata3.00: IDENTIFY complete
Jun 7 21:10:59 localhost kernel: ata3.00: failed to IDENTIFY (I/O
error, err_mask=0x2)
Jun 7 21:10:59 localhost kernel: ata3.00: revalidation failed (errno=-5)
Jun 7 21:10:59 localhost kernel: ata3: failed to recover some devices,
retrying in 5 secs
Jun 7 21:11:04 localhost kernel: ata3: soft resetting port
Jun 7 21:11:04 localhost kernel: ata3: reset complete
Jun 7 21:11:04 localhost kernel: ATA: abnormal status 0xB8 on port
0x00014107
Jun 7 21:11:04 localhost kernel: ATA: abnormal status 0xB8 on port
0x00014107
Jun 7 21:11:04 localhost kernel: ATA: abnormal status 0x58 on port
0x00014107
Jun 7 21:11:04 localhost kernel: ata3.00: issuing IDENTIFY
Jun 7 21:11:04 localhost kernel: ATA: abnormal status 0x58 on port
0x00014107
Jun 7 21:11:04 localhost last message repeated 4 times
Jun 7 21:11:04 localhost kernel: ata3.00: IDENTIFY complete
Jun 7 21:11:04 localhost kernel: ata3.00: failed to IDENTIFY (I/O
error, err_mask=0x2)
Jun 7 21:11:04 localhost kernel: ata3.00: revalidation failed (errno=-5)
Jun 7 21:11:04 localhost kernel: ata3: failed to recover some devices,
retrying in 5 secs
Jun 7 21:11:09 localhost kernel: ata3: soft resetting port
Jun 7 21:11:09 localhost kernel: ata3: reset complete
Jun 7 21:11:09 localhost kernel: ATA: abnormal status 0xB8 on port
0x00014107
Jun 7 21:11:09 localhost kernel: ATA: abnormal status 0xB8 on port
0x00014107
Jun 7 21:11:09 localhost kernel: ATA: abnormal status 0x58 on port
0x00014107
Jun 7 21:11:09 localhost kernel: ata3.00: issuing IDENTIFY
Jun 7 21:11:09 localhost kernel: ATA: abnormal status 0x58 on port
0x00014107
Jun 7 21:11:09 localhost last message repeated 4 times
Jun 7 21:11:09 localhost kernel: ata3.00: IDENTIFY complete
Jun 7 21:11:09 localhost kernel: ata3.00: failed to IDENTIFY (I/O
error, err_mask=0x2)
Jun 7 21:11:09 localhost kernel: ata3.00: revalidation failed (errno=-5)
Jun 7 21:11:09 localhost kernel: ata3.00: disabled
Jun 7 21:11:10 localhost kernel: ata3: EH complete
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: end_request: I/O error, dev sdd, sector 0
Jun 7 21:11:10 localhost kernel: Buffer I/O error on device sdd,
logical block 0
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: end_request: I/O error, dev sdd, sector 0
Jun 7 21:11:10 localhost kernel: Buffer I/O error on device sdd,
logical block 0
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: end_request: I/O error, dev sdd, sector 0
Jun 7 21:11:10 localhost kernel: Buffer I/O error on device sdd,
logical block 0
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: end_request: I/O error, dev sdd, sector 0
Jun 7 21:11:10 localhost kernel: Buffer I/O error on device sdd,
logical block 0
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: end_request: I/O error, dev sdd, sector 0
Jun 7 21:11:10 localhost kernel: Buffer I/O error on device sdd,
logical block 0
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: end_request: I/O error, dev sdd, sector 0
Jun 7 21:11:10 localhost kernel: Buffer I/O error on device sdd,
logical block 0
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: end_request: I/O error, dev sdd, sector 0
Jun 7 21:11:10 localhost kernel: Buffer I/O error on device sdd,
logical block 0
Jun 7 21:11:10 localhost kernel: Dev sdd: unable to read RDB block 0
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: end_request: I/O error, dev sdd, sector 0
Jun 7 21:11:10 localhost kernel: Buffer I/O error on device sdd,
logical block 0
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: end_request: I/O error, dev sdd, sector 0
Jun 7 21:11:10 localhost kernel: Buffer I/O error on device sdd,
logical block 0
Jun 7 21:11:10 localhost kernel: unable to read partition table
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Attached SCSI
removable disk
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: Attached scsi generic sg3
type 0
Jun 7 21:11:10 localhost udevd-event[2477]: udev_rules_apply_format:
unknown format variable '$modalias'
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:10 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:11 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:11 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:11 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:11 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:11 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:11 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:11 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:11 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:11 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:11 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:11 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:11 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:13 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:13 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:13 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:13 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:13 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:13 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:13 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:13 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:13 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:13 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:13 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:13 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:15 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:15 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:15 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:15 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:15 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:15 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:15 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:15 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:15 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:15 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:15 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:15 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:17 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:17 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:17 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:17 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:17 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:17 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:17 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:17 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:17 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:17 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:17 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:17 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:19 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:19 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:19 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:19 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:19 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:19 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:19 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:19 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:19 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:19 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:19 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:19 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:21 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:21 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:21 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:21 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:21 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:21 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:21 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:21 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:21 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:21 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:21 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:21 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:23 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:23 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:23 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:23 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:23 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:23 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:23 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:23 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:23 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:23 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:23 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:23 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:25 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:25 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:25 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:25 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:25 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:25 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:25 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:25 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:25 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:25 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:25 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:25 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:27 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:27 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:27 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:27 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:27 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:27 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:27 localhost kernel: sd 3:0:0:0: [sdd] READ CAPACITY failed
Jun 7 21:11:27 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 7 21:11:27 localhost kernel: sd 3:0:0:0: [sdd] Sense not available.
Jun 7 21:11:27 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
Jun 7 21:11:27 localhost kernel: sd 3:0:0:0: [sdd] Asking for cache
data failed
Jun 7 21:11:27 localhost kernel: sd 3:0:0:0: [sdd] Assuming drive
cache: write through
Jun 7 21:11:31 localhost kernel: pccard: card ejected from slot 0
Jun 7 21:11:31 localhost kernel: sd 3:0:0:0: [sdd] Stopping disk
Jun 7 21:11:31 localhost kernel: sd 3:0:0:0: [sdd] START_STOP FAILED
Jun 7 21:11:31 localhost kernel: sd 3:0:0:0: [sdd] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK

2007-06-08 07:11:18

by Tejun Heo

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Hello,

Robert de Rooy wrote:
> Jun 7 21:10:28 localhost kernel: ata3: soft resetting port
> Jun 7 21:10:28 localhost kernel: ata3: reset complete
> Jun 7 21:10:28 localhost kernel: ATA: abnormal status 0x80 on port
> 0x00014107
> Jun 7 21:10:28 localhost kernel: ATA: abnormal status 0x80 on port
> 0x00014107
> Jun 7 21:10:28 localhost kernel: ata3.00: issuing IDENTIFY
> Jun 7 21:10:29 localhost kernel: ata3.00: IDENTIFY complete
> Jun 7 21:10:29 localhost kernel: ata3.00: CFA: Memory Card Adapter,
> 20011212, max PIO1
> Jun 7 21:10:29 localhost kernel: ata3.00: 253696 sectors, multi 0: LBA
> Jun 7 21:10:29 localhost kernel: ata3.00: issuing IDENTIFY
> Jun 7 21:10:29 localhost kernel: ata3.00: IDENTIFY complete
> Jun 7 21:10:29 localhost kernel: ata3.00: configured for PIO0
> Jun 7 21:10:29 localhost kernel: ata3: EH complete
> Jun 7 21:10:29 localhost kernel: scsi 3:0:0:0: Direct-Access
> ATA Memory Card Adap 2001 PQ: 0 ANSI: 5
> Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] 253696 512-byte
> hardware sectors (130 MB)
> Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
> Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] Write cache:
> disabled, read cache: enabled, doesn't support DPO or FUA
> Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] 253696 512-byte
> hardware sectors (130 MB)
> Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
> Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] Write cache:
> disabled, read cache: enabled, doesn't support DPO or FUA

So, that made it go through detection okay. That's a good news.

> Jun 7 21:10:59 localhost kernel: sdd:<3>ata3.00: exception Emask 0x0
> SAct 0x0 SErr 0x0 action 0x2 frozen
> Jun 7 21:10:59 localhost kernel: ata3.00: cmd
> 20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
> Jun 7 21:10:59 localhost kernel: res
> 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)

But, read for partition table failed miserably and took the device
offline completely.

Whee... Cc'ing linux-ide and Mark Lord. The original thread is..

http://thread.gmane.org/gmane.linux.kernel/530099

Any ideas?

--
tejun

2007-06-08 12:58:26

by Mark Lord

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Tejun Heo wrote:
>
>> Jun 7 21:10:29 localhost kernel: ata3.00: CFA: Memory Card Adapter,
>> 20011212, max PIO1
>> Jun 7 21:10:29 localhost kernel: ata3.00: 253696 sectors, multi 0: LBA
>> Jun 7 21:10:29 localhost kernel: ata3.00: issuing IDENTIFY
>> Jun 7 21:10:29 localhost kernel: ata3.00: IDENTIFY complete
>> Jun 7 21:10:29 localhost kernel: ata3.00: configured for PIO0
>> Jun 7 21:10:29 localhost kernel: ata3: EH complete
>> Jun 7 21:10:29 localhost kernel: scsi 3:0:0:0: Direct-Access
>> ATA Memory Card Adap 2001 PQ: 0 ANSI: 5
>> Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] 253696 512-byte
>> hardware sectors (130 MB)
>> Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
>> Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] Write cache:
>> disabled, read cache: enabled, doesn't support DPO or FUA
>> Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] 253696 512-byte
>> hardware sectors (130 MB)
>> Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] Write Protect is off
>> Jun 7 21:10:29 localhost kernel: sd 3:0:0:0: [sdd] Write cache:
>> disabled, read cache: enabled, doesn't support DPO or FUA
>
> So, that made it go through detection okay. That's a good news.
>
>> Jun 7 21:10:59 localhost kernel: sdd:<3>ata3.00: exception Emask 0x0
>> SAct 0x0 SErr 0x0 action 0x2 frozen
>> Jun 7 21:10:59 localhost kernel: ata3.00: cmd
>> 20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
>> Jun 7 21:10:59 localhost kernel: res
>> 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
>
> But, read for partition table failed miserably and took the device
> offline completely.
>
> Whee... Cc'ing linux-ide and Mark Lord. The original thread is..
>
> http://thread.gmane.org/gmane.linux.kernel/530099
>
> Any ideas?

I still don't see much evidence that interrupts are actually functioning here.
It would be good to see /proc/interrupts before/after libata tries to talk to it.

Let's assume for the moment that interrupts are b0rken.
The legacy IDE driver can talk to such devices completely without interrupts,
if the IDE polling patch (below) is applied.

So, Robert: could you try again with the old IDE driver,
except apply this patch to it first? This will give valuable info.


--- old/drivers/ide/ide-probe.c 2007-04-11 00:18:51.000000000 -0400
+++ linux/drivers/ide/ide-probe.c 2007-04-12 09:26:14.000000000 -0400
@@ -1014,6 +1014,27 @@
* but anything else has led to problems on some machines. We re-enable
* interrupts as much as we can safely do in most places.
*/
+struct timer_list polling_timer;
+static void ide_polling (unsigned long data)
+{
+ ide_hwgroup_t *hwgroup = (void *)data;
+ ide_hwif_t *hwif;
+ int irq = 0;
+
+ if (hwgroup) {
+ hwif = hwgroup->hwif;
+ if (hwif)
+ irq = hwif->irq;
+ }
+
+ ide_intr(irq, hwgroup);
+ init_timer(&polling_timer);
+ polling_timer.expires = jiffies + 2;
+ polling_timer.function = &ide_polling;
+ polling_timer.data = (unsigned long) hwgroup;
+ add_timer(&polling_timer);
+}
+
static int init_irq (ide_hwif_t *hwif)
{
unsigned int index;
@@ -1110,9 +1131,12 @@
if (hwif->io_ports[IDE_CONTROL_OFFSET])
/* clear nIEN */
hwif->OUTB(0x08, hwif->io_ports[IDE_CONTROL_OFFSET]);
-
+#if 0
if (request_irq(hwif->irq,&ide_intr,sa,hwif->name,hwgroup))
goto out_unlink;
+#else
+ ide_polling((unsigned long)hwgroup);
+#endif
}

/*
@@ -1156,6 +1180,7 @@
printk("\n");
up(&ide_cfg_sem);
return 0;
+#if 0
out_unlink:
spin_lock_irq(&ide_lock);
if (hwif->next == hwif) {
@@ -1176,6 +1201,7 @@
BUG_ON(hwgroup->hwif == hwif);
}
spin_unlock_irq(&ide_lock);
+#endif
out_up:
up(&ide_cfg_sem);
return 1;
--- old/drivers/ide/ide.c 2007-04-11 00:18:51.000000000 -0400
+++ linux/drivers/ide/ide.c 2007-04-12 09:31:59.000000000 -0400
@@ -569,6 +569,8 @@
* This is raving bonkers.
*/

+extern struct timer_list polling_timer;
+
void ide_unregister(unsigned int index)
{
ide_drive_t *drive;
@@ -612,7 +614,11 @@
g = g->next;
} while (g != hwgroup->hwif);
if (irq_count == 1)
+#if 0
free_irq(hwif->irq, hwgroup);
+#else
+ del_timer(&polling_timer);
+#endif

spin_lock_irq(&ide_lock);
/*

2007-06-08 22:06:33

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Mark Lord wrote:
> I still don't see much evidence that interrupts are actually
> functioning here.
> It would be good to see /proc/interrupts before/after libata tries to
> talk to it.
>
> Let's assume for the moment that interrupts are b0rken.
> The legacy IDE driver can talk to such devices completely without
> interrupts,
> if the IDE polling patch (below) is applied.
>
> So, Robert: could you try again with the old IDE driver,
> except apply this patch to it first? This will give valuable info.
I tried the patch, but a get a kernel panic on boot with it. I can try
to get a screenshot of it tomorrow.

2007-06-08 22:11:20

by Mark Lord

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Robert de Rooy wrote:
> Mark Lord wrote:
>> I still don't see much evidence that interrupts are actually
>> functioning here.
>> It would be good to see /proc/interrupts before/after libata tries to
>> talk to it.
>>
>> Let's assume for the moment that interrupts are b0rken.
>> The legacy IDE driver can talk to such devices completely without
>> interrupts,
>> if the IDE polling patch (below) is applied.
>>
>> So, Robert: could you try again with the old IDE driver,
>> except apply this patch to it first? This will give valuable info.
>
> I tried the patch, but a get a kernel panic on boot with it. I can try
> to get a screenshot of it tomorrow.

Oh crap. I did test it a couple of months ago, but my boot/root drive
is libata not IDE -- so no panic on boot with it. After booting, it worked
just fine talking to PC-CARD CF devices using the polling.

=ml

2007-06-09 21:02:20

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Mark Lord wrote:
> Oh crap. I did test it a couple of months ago, but my boot/root drive
> is libata not IDE -- so no panic on boot with it. After booting, it
> worked
> just fine talking to PC-CARD CF devices using the polling.
>
> =ml

Ok, no problem. I recompiled the kernel with libata (but without the
libata pcmcia support), and made legacy ide (only ide-core and ide-cs)
modular.
This allowed me to boot my PATA HDD with libata, and when I plugged in
the PCMCIA card it picked it up automatically with the legacy ide drivers.

Jun 10 02:40:06 localhost kernel: pccard: PCMCIA card inserted into slot 0
Jun 10 02:40:07 localhost kernel: cs: memory probe
0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
Jun 10 02:40:07 localhost kernel: cs: memory probe
0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
0xcfa00000-0xd01fffff
Jun 10 02:40:07 localhost kernel: pcmcia: registering new device pcmcia0.0
Jun 10 02:40:07 localhost kernel: Uniform Multi-Platform E-IDE driver
Revision: 7.00alpha2
Jun 10 02:40:07 localhost kernel: ide: Assuming 33MHz system bus speed
for PIO modes; override with idebus=xx
Jun 10 02:40:07 localhost kernel: hda: Memory Card Adapter, CFA DISK drive
Jun 10 02:40:08 localhost kernel: ide0 at 0x4100-0x4107,0x410e on irq 3
Jun 10 02:40:08 localhost kernel: ide-cs: hda: Vpp = 0.0
Jun 10 02:40:08 localhost udevd-event[2630]: udev_rules_apply_format:
unknown format variable '$modalias'

At this point I noticed no /dev/hda* devices existed, so I created them
manually with mknod. But regardless I was not able to actually mount a
filesystem, getting an error from mount that the device did not exist.

When pulling the card I also got the following..

Jun 10 02:41:53 localhost kernel: pccard: card ejected from slot 0
Jun 10 02:41:53 localhost kernel:
Jun 10 02:41:53 localhost kernel:
======================================================
Jun 10 02:41:53 localhost kernel: [ INFO: soft-safe -> soft-unsafe lock
order detected ]
Jun 10 02:41:53 localhost kernel: 2.6.22-rc4 #5
Jun 10 02:41:53 localhost kernel:
------------------------------------------------------
Jun 10 02:41:53 localhost kernel: pccardd/355 [HC0[0]:SC0[0]:HE0:SE1] is
trying to acquire:
Jun 10 02:41:53 localhost kernel: (resource_lock){--..}, at:
[<c042dcb2>] __release_region+0x2f/0xdd
Jun 10 02:41:53 localhost kernel:
Jun 10 02:41:53 localhost kernel: and this task is already holding:
Jun 10 02:41:53 localhost kernel: (ide_lock){.+..}, at: [<f8e0269d>]
ide_unregister+0x11d/0x56e [ide_core]
Jun 10 02:41:53 localhost kernel: which would create a new lock dependency:
Jun 10 02:41:53 localhost kernel: (ide_lock){.+..} -> (resource_lock){--..}
Jun 10 02:41:53 localhost kernel:
Jun 10 02:41:53 localhost kernel: but this new dependency connects a
soft-irq-safe lock:
Jun 10 02:41:53 localhost kernel: (ide_lock){.+..}
Jun 10 02:41:53 localhost kernel: ... which became soft-irq-safe at:
Jun 10 02:41:53 localhost kernel: [<c0444171>] __lock_acquire+0x3ad/0xb12
Jun 10 02:41:53 localhost kernel: [<c0444c97>] lock_acquire+0x56/0x6f
Jun 10 02:41:53 localhost kernel: [<c061711f>]
_spin_lock_irqsave+0x34/0x44
Jun 10 02:41:53 localhost kernel: [<f8e04679>] ide_intr+0x17/0x1ac
[ide_core]
Jun 10 02:41:53 localhost kernel: [<f8e07825>] ide_polling+0x22/0x64
[ide_core]
Jun 10 02:41:53 localhost kernel: [<c0430446>]
run_timer_softirq+0x11a/0x182
Jun 10 02:41:53 localhost kernel: [<c042d286>] __do_softirq+0x6f/0xe9
Jun 10 02:41:53 localhost kernel: [<c0406f72>] do_softirq+0x61/0xc7
Jun 10 02:41:53 localhost kernel: [<ffffffff>] 0xffffffff
Jun 10 02:41:53 localhost kernel:
Jun 10 02:41:53 localhost kernel: to a soft-irq-unsafe lock:
Jun 10 02:41:53 localhost kernel: (resource_lock){--..}
Jun 10 02:41:53 localhost kernel: ... which became soft-irq-unsafe at:
Jun 10 02:41:53 localhost kernel: ... [<c04441e4>]
__lock_acquire+0x420/0xb12
Jun 10 02:41:53 localhost kernel: [<c0444c97>] lock_acquire+0x56/0x6f
Jun 10 02:41:53 localhost kernel: [<c0616e5e>] _write_lock+0x2b/0x38
Jun 10 02:41:53 localhost kernel: [<c042dc60>] request_resource+0x13/0x36
Jun 10 02:41:53 localhost kernel: [<c05068bb>] vgacon_startup+0x196/0x349
Jun 10 02:41:53 localhost kernel: [<c075d3d5>] con_init+0x1a/0x217
Jun 10 02:41:53 localhost kernel: [<c075cee5>] console_init+0x19/0x27
Jun 10 02:41:53 localhost kernel: [<c07428b5>] start_kernel+0x242/0x34c
Jun 10 02:41:53 localhost kernel: [<00000000>] 0x0
Jun 10 02:41:53 localhost kernel: [<ffffffff>] 0xffffffff
Jun 10 02:41:53 localhost kernel:
Jun 10 02:41:53 localhost kernel: other info that might help us debug this:
Jun 10 02:41:53 localhost kernel:
Jun 10 02:41:53 localhost kernel: 2 locks held by pccardd/355:
Jun 10 02:41:53 localhost kernel: #0: (&socket->skt_mutex){--..}, at:
[<c0615d3b>] mutex_lock+0x21/0x24
Jun 10 02:41:53 localhost kernel: #1: (ide_lock){.+..}, at:
[<f8e0269d>] ide_unregister+0x11d/0x56e [ide_core]
Jun 10 02:41:53 localhost kernel:
Jun 10 02:41:53 localhost kernel: the soft-irq-safe lock's dependencies:
Jun 10 02:41:53 localhost kernel: -> (ide_lock){.+..} ops: 0 {
Jun 10 02:41:53 localhost kernel: initial-use at:
Jun 10 02:41:53 localhost kernel: [<c04441f9>]
__lock_acquire+0x435/0xb12
Jun 10 02:41:53 localhost kernel: [<c0444c97>]
lock_acquire+0x56/0x6f
Jun 10 02:41:53 localhost kernel: [<c061711f>]
_spin_lock_irqsave+0x34/0x44
Jun 10 02:41:53 localhost kernel: [<f8e04679>]
ide_intr+0x17/0x1ac [ide_core]
Jun 10 02:41:53 localhost kernel: [<f8e07825>]
ide_polling+0x22/0x64 [ide_core]
Jun 10 02:41:53 localhost kernel: [<f8e07a62>]
init_irq+0x1fb/0x3bd [ide_core]
Jun 10 02:41:53 localhost kernel: [<f8e07d4e>]
hwif_init+0x12a/0x302 [ide_core]
Jun 10 02:41:53 localhost kernel: [<f8e0808c>]
probe_hwif_init_with_fixup+0x20/0x8c [ide_core]
Jun 10 02:41:53 localhost kernel: [<f8e02c11>]
ide_register_hw_with_fixup+0x123/0x156 [ide_core]
Jun 10 02:41:53 localhost kernel: [<f8cae0b8>]
idecs_register+0x72/0x7a [ide_cs]
Jun 10 02:41:53 localhost kernel: [<f8cae464>]
ide_probe+0x3a4/0x4c0 [ide_cs]
Jun 10 02:41:53 localhost kernel: [<c0566ac3>]
pcmcia_device_probe+0xab/0xff
Jun 10 02:41:53 localhost kernel: [<c055ccdc>]
driver_probe_device+0xe9/0x16a
Jun 10 02:41:53 localhost kernel: [<c055ce86>]
__driver_attach+0x76/0xaf
Jun 10 02:41:53 localhost kernel: [<c055c1cc>]
bus_for_each_dev+0x3a/0x5f
Jun 10 02:41:53 localhost kernel: [<c055cb27>]
driver_attach+0x19/0x1b
Jun 10 02:41:53 localhost kernel: [<c055c4ea>]
bus_add_driver+0x79/0x181
Jun 10 02:41:53 localhost kernel: [<c055d081>]
driver_register+0x67/0x6c
Jun 10 02:41:53 localhost kernel: [<c0567565>]
pcmcia_register_driver+0xf7/0x128
Jun 10 02:41:53 localhost kernel: [<f8a2f00d>]
0xf8a2f00d
Jun 10 02:41:53 localhost kernel: [<c044c2eb>]
sys_init_module+0x1579/0x16ca
Jun 10 02:41:53 localhost kernel: [<c0404e26>]
sysenter_past_esp+0x5f/0x99
Jun 10 02:41:53 localhost kernel: [<ffffffff>]
0xffffffff
Jun 10 02:41:53 localhost kernel: in-softirq-W at:
Jun 10 02:41:53 localhost kernel: [<c0444171>]
__lock_acquire+0x3ad/0xb12
Jun 10 02:41:53 localhost kernel: [<c0444c97>]
lock_acquire+0x56/0x6f
Jun 10 02:41:53 localhost kernel: [<c061711f>]
_spin_lock_irqsave+0x34/0x44
Jun 10 02:41:53 localhost kernel: [<f8e04679>]
ide_intr+0x17/0x1ac [ide_core]
Jun 10 02:41:53 localhost kernel: [<f8e07825>]
ide_polling+0x22/0x64 [ide_core]
Jun 10 02:41:53 localhost kernel: [<c0430446>]
run_timer_softirq+0x11a/0x182
Jun 10 02:41:53 localhost kernel: [<c042d286>]
__do_softirq+0x6f/0xe9
Jun 10 02:41:53 localhost kernel: [<c0406f72>]
do_softirq+0x61/0xc7
Jun 10 02:41:53 localhost kernel: [<ffffffff>]
0xffffffff
Jun 10 02:41:53 localhost kernel: }
Jun 10 02:41:53 localhost kernel: ... key at: [<f8e13c10>]
ide_lock+0x10/0xffff6afd [ide_core]
Jun 10 02:41:53 localhost kernel: -> (&n->list_lock){.+..} ops: 0 {
Jun 10 02:41:53 localhost kernel: initial-use at:
Jun 10 02:41:53 localhost kernel: [<c04441f9>]
__lock_acquire+0x435/0xb12
Jun 10 02:41:53 localhost kernel: [<c0444c97>]
lock_acquire+0x56/0x6f
Jun 10 02:41:53 localhost kernel: [<c0616de9>]
_spin_lock+0x2b/0x38
Jun 10 02:41:53 localhost kernel: [<c04788ee>]
add_partial+0xe/0x27
Jun 10 02:41:53 localhost kernel: [<c04794ed>]
__slab_free+0x5e/0x278
Jun 10 02:41:53 localhost kernel: [<c0479ec2>]
kmem_cache_free+0x77/0x97
Jun 10 02:41:53 localhost kernel: [<c05119ac>]
acpi_os_release_object+0x8/0xc
Jun 10 02:41:53 localhost kernel: [<c0527d9a>]
acpi_ut_delete_object_desc+0x47/0x4d
Jun 10 02:41:53 localhost kernel: [<c05274c5>]
acpi_ut_delete_internal_obj+0x141/0x148
Jun 10 02:41:53 localhost kernel: [<c0527519>]
acpi_ut_update_ref_count+0x4d/0xa6
Jun 10 02:41:53 localhost kernel: [<c0527631>]
acpi_ut_update_object_reference+0xbf/0x125
Jun 10 02:41:53 localhost kernel: [<c05276bc>]
acpi_ut_remove_reference+0x25/0x28
Jun 10 02:41:53 localhost kernel: [<c051c4e9>]
acpi_ex_create_method+0x99/0xa3
Jun 10 02:41:53 localhost kernel: [<c0515729>]
acpi_ds_load1_end_op+0xfd/0x144
Jun 10 02:41:53 localhost kernel: [<c0522e32>]
acpi_ps_parse_loop+0x587/0x719
Jun 10 02:41:53 localhost kernel: [<c0522292>]
acpi_ps_parse_aml+0x68/0x246
Jun 10 02:41:53 localhost kernel: [<c0521c42>]
acpi_ns_one_complete_parse+0xbe/0xd1
Jun 10 02:41:53 localhost kernel: [<c0521c67>]
acpi_ns_parse_table+0x12/0x23
Jun 10 02:41:53 localhost kernel: [<c051fda2>]
acpi_ns_load_table+0x3e/0x80
Jun 10 02:41:53 localhost kernel: [<c0524bbb>]
acpi_load_tables+0xd3/0x17f
Jun 10 02:41:53 localhost kernel: [<c075aa59>]
acpi_early_init+0x71/0x105
Jun 10 02:41:53 localhost kernel: [<c07429b2>]
start_kernel+0x33f/0x34c
Jun 10 02:41:53 localhost kernel: [<00000000>] 0x0
Jun 10 02:41:53 localhost kernel: [<ffffffff>]
0xffffffff
Jun 10 02:41:53 localhost kernel: in-softirq-W at:
Jun 10 02:41:53 localhost kernel: [<c0444171>]
__lock_acquire+0x3ad/0xb12
Jun 10 02:41:53 localhost kernel: [<c0444c97>]
lock_acquire+0x56/0x6f
Jun 10 02:41:53 localhost kernel: [<c0616de9>]
_spin_lock+0x2b/0x38
Jun 10 02:41:53 localhost kernel: [<c04788ee>]
add_partial+0xe/0x27
Jun 10 02:41:53 localhost kernel: [<c04794ed>]
__slab_free+0x5e/0x278
Jun 10 02:41:53 localhost kernel: [<c0479ec2>]
kmem_cache_free+0x77/0x97
Jun 10 02:41:53 localhost kernel: [<c048c53a>]
__d_free+0x23/0x26
Jun 10 02:41:53 localhost kernel: [<c048c5b5>]
d_callback+0xb/0xd
Jun 10 02:41:53 localhost kernel: [<c043766f>]
__rcu_process_callbacks+0xff/0x16f
Jun 10 02:41:53 localhost kernel: [<c04376fa>]
rcu_process_callbacks+0x1b/0x35
Jun 10 02:41:53 localhost kernel: [<c042d386>]
tasklet_action+0x53/0xa8
Jun 10 02:41:53 localhost kernel: [<c042d286>]
__do_softirq+0x6f/0xe9
Jun 10 02:41:53 localhost kernel: [<c0406f72>]
do_softirq+0x61/0xc7
Jun 10 02:41:53 localhost kernel: [<ffffffff>]
0xffffffff
Jun 10 02:41:53 localhost kernel: }
Jun 10 02:41:53 localhost kernel: ... key at: [<c0a1f0e4>]
__key.17793+0x0/0x8
Jun 10 02:41:53 localhost kernel: ... acquired at:
Jun 10 02:41:53 localhost kernel: [<c044475d>] __lock_acquire+0x999/0xb12
Jun 10 02:41:53 localhost kernel: [<c0444c97>] lock_acquire+0x56/0x6f
Jun 10 02:41:53 localhost kernel: [<c0616de9>] _spin_lock+0x2b/0x38
Jun 10 02:41:53 localhost kernel: [<c04788ee>] add_partial+0xe/0x27
Jun 10 02:41:53 localhost kernel: [<c04794ed>] __slab_free+0x5e/0x278
Jun 10 02:41:53 localhost kernel: [<c0479ca6>] kfree+0x82/0xa2
Jun 10 02:41:53 localhost kernel: [<f8e08223>]
drive_release_dev+0x67/0xae [ide_core]
Jun 10 02:41:53 localhost kernel: [<c055a228>] device_release+0x3c/0x7e
Jun 10 02:41:53 localhost kernel: [<c04ea5b3>] kobject_cleanup+0x45/0x5f
Jun 10 02:41:53 localhost kernel: [<c04ea5d8>] kobject_release+0xb/0xd
Jun 10 02:41:53 localhost kernel: [<c04eb1df>] kref_put+0x63/0x71
Jun 10 02:41:53 localhost kernel: [<c04ea56c>] kobject_put+0x14/0x16
Jun 10 02:41:53 localhost kernel: [<c055a37b>] put_device+0x11/0x13
Jun 10 02:41:53 localhost kernel: [<c055ab1f>]
device_unregister+0x12/0x15
Jun 10 02:41:53 localhost kernel: [<f8e02623>]
ide_unregister+0xa3/0x56e [ide_core]
Jun 10 02:41:53 localhost kernel: [<f8cae01b>] ide_release+0x1b/0x2d
[ide_cs]
Jun 10 02:41:53 localhost kernel: [<f8cae038>] ide_detach+0xb/0x19
[ide_cs]
Jun 10 02:41:53 localhost kernel: [<c056697d>]
pcmcia_device_remove+0x53/0xb9
Jun 10 02:41:53 localhost kernel: [<c055caf2>]
__device_release_driver+0x74/0x90
Jun 10 02:41:53 localhost kernel: [<c055cef4>]
device_release_driver+0x35/0x4c
Jun 10 02:41:53 localhost kernel: [<c055c462>]
bus_remove_device+0x73/0x82
Jun 10 02:41:53 localhost kernel: [<c055aa97>] device_del+0x218/0x28e
Jun 10 02:41:53 localhost kernel: [<c055ab18>] device_unregister+0xb/0x15
Jun 10 02:41:53 localhost kernel: [<c05665a1>]
pcmcia_card_remove+0x5a/0x7d
Jun 10 02:41:53 localhost kernel: [<c0566f88>] ds_event+0x59/0x8b
Jun 10 02:41:53 localhost kernel: [<c0562c20>] send_event+0x3e/0x57
Jun 10 02:41:53 localhost kernel: [<c0562e0b>]
socket_remove_drivers+0x12/0x14
Jun 10 02:41:53 localhost kernel: [<c0562e1c>] socket_shutdown+0xf/0xb5
Jun 10 02:41:53 localhost kernel: [<c0562ee8>] socket_remove+0x26/0x2b
Jun 10 02:41:53 localhost kernel: [<c05634b4>] pccardd+0x12a/0x1e6
Jun 10 02:41:53 localhost kernel: [<c0439600>] kthread+0x3b/0x63
Jun 10 02:41:53 localhost kernel: [<c0405b13>]
kernel_thread_helper+0x7/0x10
Jun 10 02:41:53 localhost kernel: [<ffffffff>] 0xffffffff
Jun 10 02:41:53 localhost kernel:
Jun 10 02:41:53 localhost kernel:
Jun 10 02:41:53 localhost kernel: the soft-irq-unsafe lock's dependencies:
Jun 10 02:41:53 localhost kernel: -> (resource_lock){--..} ops: 0 {
Jun 10 02:41:53 localhost kernel: initial-use at:
Jun 10 02:41:53 localhost kernel: [<c04441f9>]
__lock_acquire+0x435/0xb12
Jun 10 02:41:53 localhost kernel: [<c0444c97>]
lock_acquire+0x56/0x6f
Jun 10 02:41:53 localhost kernel: [<c0616e5e>]
_write_lock+0x2b/0x38
Jun 10 02:41:53 localhost kernel: [<c042dc60>]
request_resource+0x13/0x36
Jun 10 02:41:53 localhost kernel: [<c05068bb>]
vgacon_startup+0x196/0x349
Jun 10 02:41:53 localhost kernel: [<c075d3d5>]
con_init+0x1a/0x217
Jun 10 02:41:53 localhost kernel: [<c075cee5>]
console_init+0x19/0x27
Jun 10 02:41:53 localhost kernel: [<c07428b5>]
start_kernel+0x242/0x34c
Jun 10 02:41:53 localhost kernel: [<00000000>] 0x0
Jun 10 02:41:53 localhost kernel: [<ffffffff>]
0xffffffff
Jun 10 02:41:53 localhost kernel: softirq-on-W at:
Jun 10 02:41:53 localhost kernel: [<c04441e4>]
__lock_acquire+0x420/0xb12
Jun 10 02:41:53 localhost kernel: [<c0444c97>]
lock_acquire+0x56/0x6f
Jun 10 02:41:53 localhost kernel: [<c0616e5e>]
_write_lock+0x2b/0x38
Jun 10 02:41:53 localhost kernel: [<c042dc60>]
request_resource+0x13/0x36
Jun 10 02:41:53 localhost kernel: [<c05068bb>]
vgacon_startup+0x196/0x349
Jun 10 02:41:53 localhost kernel: [<c075d3d5>]
con_init+0x1a/0x217
Jun 10 02:41:53 localhost kernel: [<c075cee5>]
console_init+0x19/0x27
Jun 10 02:41:53 localhost kernel: [<c07428b5>]
start_kernel+0x242/0x34c
Jun 10 02:41:53 localhost kernel: [<00000000>] 0x0
Jun 10 02:41:53 localhost kernel: [<ffffffff>]
0xffffffff
Jun 10 02:41:53 localhost kernel: hardirq-on-W at:
Jun 10 02:41:53 localhost kernel: [<c04441c0>]
__lock_acquire+0x3fc/0xb12
Jun 10 02:41:53 localhost kernel: [<c0444c97>]
lock_acquire+0x56/0x6f
Jun 10 02:41:53 localhost kernel: [<c0616e5e>]
_write_lock+0x2b/0x38
Jun 10 02:41:53 localhost kernel: [<c042dc60>]
request_resource+0x13/0x36
Jun 10 02:41:53 localhost kernel: [<c05068bb>]
vgacon_startup+0x196/0x349
Jun 10 02:41:53 localhost kernel: [<c075d3d5>]
con_init+0x1a/0x217
Jun 10 02:41:53 localhost kernel: [<c075cee5>]
console_init+0x19/0x27
Jun 10 02:41:53 localhost kernel: [<c07428b5>]
start_kernel+0x242/0x34c
Jun 10 02:41:53 localhost kernel: [<00000000>] 0x0
Jun 10 02:41:53 localhost kernel: [<ffffffff>]
0xffffffff
Jun 10 02:41:53 localhost kernel: }
Jun 10 02:41:53 localhost kernel: ... key at: [<c06fce14>]
resource_lock+0x10/0x1c
Jun 10 02:41:53 localhost kernel:
Jun 10 02:41:53 localhost kernel: stack backtrace:
Jun 10 02:41:53 localhost kernel: [<c0405e6a>] show_trace_log_lvl+0x1a/0x2f
Jun 10 02:41:53 localhost kernel: [<c04068cf>] show_trace+0x12/0x14
Jun 10 02:41:53 localhost kernel: [<c0406928>] dump_stack+0x16/0x18
Jun 10 02:41:53 localhost kernel: [<c0443d30>] check_usage+0x258/0x262
Jun 10 02:41:53 localhost kernel: [<c04446c2>] __lock_acquire+0x8fe/0xb12
Jun 10 02:41:53 localhost kernel: [<c0444c97>] lock_acquire+0x56/0x6f
Jun 10 02:41:53 localhost kernel: [<c0616e5e>] _write_lock+0x2b/0x38
Jun 10 02:41:53 localhost kernel: [<c042dcb2>] __release_region+0x2f/0xdd
Jun 10 02:41:53 localhost kernel: [<f8e02521>]
ide_hwif_release_regions+0x37/0x96 [ide_core]
Jun 10 02:41:53 localhost kernel: [<f8e026a4>]
ide_unregister+0x124/0x56e [ide_core]
Jun 10 02:41:53 localhost kernel: [<f8cae01b>] ide_release+0x1b/0x2d
[ide_cs]
Jun 10 02:41:53 localhost kernel: [<f8cae038>] ide_detach+0xb/0x19 [ide_cs]
Jun 10 02:41:53 localhost kernel: [<c056697d>]
pcmcia_device_remove+0x53/0xb9
Jun 10 02:41:53 localhost kernel: [<c055caf2>]
__device_release_driver+0x74/0x90
Jun 10 02:41:53 localhost kernel: [<c055cef4>]
device_release_driver+0x35/0x4c
Jun 10 02:41:53 localhost kernel: [<c055c462>] bus_remove_device+0x73/0x82
Jun 10 02:41:53 localhost kernel: [<c055aa97>] device_del+0x218/0x28e
Jun 10 02:41:53 localhost kernel: [<c055ab18>] device_unregister+0xb/0x15
Jun 10 02:41:53 localhost kernel: [<c05665a1>] pcmcia_card_remove+0x5a/0x7d
Jun 10 02:41:53 localhost kernel: [<c0566f88>] ds_event+0x59/0x8b
Jun 10 02:41:53 localhost kernel: [<c0562c20>] send_event+0x3e/0x57
Jun 10 02:41:53 localhost kernel: [<c0562e0b>]
socket_remove_drivers+0x12/0x14
Jun 10 02:41:53 localhost kernel: [<c0562e1c>] socket_shutdown+0xf/0xb5
Jun 10 02:41:53 localhost kernel: [<c0562ee8>] socket_remove+0x26/0x2b
Jun 10 02:41:53 localhost kernel: [<c05634b4>] pccardd+0x12a/0x1e6
Jun 10 02:41:53 localhost kernel: [<c0439600>] kthread+0x3b/0x63
Jun 10 02:41:53 localhost kernel: [<c0405b13>]
kernel_thread_helper+0x7/0x10
Jun 10 02:41:53 localhost kernel: =======================
Jun 10 02:41:53 localhost kernel: BUG: sleeping function called from
invalid context at kernel/rwsem.c:20
Jun 10 02:41:53 localhost kernel: in_atomic():0, irqs_disabled():1
Jun 10 02:41:53 localhost kernel: INFO: lockdep is turned off.
Jun 10 02:41:53 localhost kernel: irq event stamp: 3798
Jun 10 02:41:53 localhost kernel: hardirqs last enabled at (3797):
[<c06171ed>] _spin_unlock_irqrestore+0x36/0x3c
Jun 10 02:41:53 localhost kernel: hardirqs last disabled at (3798):
[<c0617032>] _spin_lock_irq+0xf/0x3e
Jun 10 02:41:53 localhost kernel: softirqs last enabled at (3656):
[<c042d2fa>] __do_softirq+0xe3/0xe9
Jun 10 02:41:53 localhost kernel: softirqs last disabled at (3647):
[<c0406f72>] do_softirq+0x61/0xc7
Jun 10 02:41:53 localhost kernel: [<c0405e6a>] show_trace_log_lvl+0x1a/0x2f
Jun 10 02:41:53 localhost kernel: [<c04068cf>] show_trace+0x12/0x14
Jun 10 02:41:53 localhost kernel: [<c0406928>] dump_stack+0x16/0x18
Jun 10 02:41:53 localhost kernel: [<c0422152>] __might_sleep+0xce/0xd5
Jun 10 02:41:53 localhost kernel: [<c043ca58>] down_read+0x18/0x51
Jun 10 02:41:53 localhost kernel: [<c04f9066>] pci_get_subsys+0x69/0xe9
Jun 10 02:41:53 localhost kernel: [<c04f90ff>] pci_get_device+0x19/0x1b
Jun 10 02:41:53 localhost kernel: [<f8e0223a>]
init_hwif_default+0x2d/0xf4 [ide_core]
Jun 10 02:41:53 localhost kernel: [<f8e027c6>]
ide_unregister+0x246/0x56e [ide_core]
Jun 10 02:41:53 localhost kernel: [<f8cae01b>] ide_release+0x1b/0x2d
[ide_cs]
Jun 10 02:41:53 localhost kernel: [<f8cae038>] ide_detach+0xb/0x19 [ide_cs]
Jun 10 02:41:53 localhost kernel: [<c056697d>]
pcmcia_device_remove+0x53/0xb9
Jun 10 02:41:53 localhost kernel: [<c055caf2>]
__device_release_driver+0x74/0x90
Jun 10 02:41:53 localhost kernel: [<c055cef4>]
device_release_driver+0x35/0x4c
Jun 10 02:41:53 localhost kernel: [<c055c462>] bus_remove_device+0x73/0x82
Jun 10 02:41:53 localhost kernel: [<c055aa97>] device_del+0x218/0x28e
Jun 10 02:41:53 localhost kernel: [<c055ab18>] device_unregister+0xb/0x15
Jun 10 02:41:53 localhost kernel: [<c05665a1>] pcmcia_card_remove+0x5a/0x7d
Jun 10 02:41:53 localhost kernel: [<c0566f88>] ds_event+0x59/0x8b
Jun 10 02:41:53 localhost kernel: [<c0562c20>] send_event+0x3e/0x57
Jun 10 02:41:53 localhost kernel: [<c0562e0b>]
socket_remove_drivers+0x12/0x14
Jun 10 02:41:53 localhost kernel: [<c0562e1c>] socket_shutdown+0xf/0xb5
Jun 10 02:41:53 localhost kernel: [<c0562ee8>] socket_remove+0x26/0x2b
Jun 10 02:41:53 localhost kernel: [<c05634b4>] pccardd+0x12a/0x1e6
Jun 10 02:41:53 localhost kernel: [<c0439600>] kthread+0x3b/0x63
Jun 10 02:41:53 localhost kernel: [<c0405b13>]
kernel_thread_helper+0x7/0x10
Jun 10 02:41:53 localhost kernel: =======================



2007-06-10 20:46:34

by Mark Lord

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Robert de Rooy wrote:
> Mark Lord wrote:
>> Oh crap. I did test it a couple of months ago, but my boot/root drive
>> is libata not IDE -- so no panic on boot with it. After booting, it
>> worked
>> just fine talking to PC-CARD CF devices using the polling.
>
> Ok, no problem. I recompiled the kernel with libata (but without the
> libata pcmcia support), and made legacy ide (only ide-core and ide-cs)
> modular.
> This allowed me to boot my PATA HDD with libata, and when I plugged in
> the PCMCIA card it picked it up automatically with the legacy ide drivers.

Good stuff!

> Jun 10 02:40:06 localhost kernel: pccard: PCMCIA card inserted into slot 0
> Jun 10 02:40:07 localhost kernel: cs: memory probe
> 0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
> Jun 10 02:40:07 localhost kernel: cs: memory probe
> 0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
> 0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
> 0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
> 0xcfa00000-0xd01fffff
> Jun 10 02:40:07 localhost kernel: pcmcia: registering new device pcmcia0.0
> Jun 10 02:40:07 localhost kernel: Uniform Multi-Platform E-IDE driver
> Revision: 7.00alpha2
> Jun 10 02:40:07 localhost kernel: ide: Assuming 33MHz system bus speed
> for PIO modes; override with idebus=xx
> Jun 10 02:40:07 localhost kernel: hda: Memory Card Adapter, CFA DISK drive
> Jun 10 02:40:08 localhost kernel: ide0 at 0x4100-0x4107,0x410e on irq 3
> Jun 10 02:40:08 localhost kernel: ide-cs: hda: Vpp = 0.0
> Jun 10 02:40:08 localhost udevd-event[2630]: udev_rules_apply_format:
> unknown format variable '$modalias'
>
> At this point I noticed no /dev/hda* devices existed, so I created them
> manually with mknod. But regardless I was not able to actually mount a
> filesystem, getting an error from mount that the device did not exist.

Yeah, I don't see any "parition table" messages there,
so it must've hung on the I/O somehow.
Bummer, but it was worth trying, I suppose.

> When pulling the card I also got the following..
>
..
> Jun 10 02:41:53 localhost kernel: [ INFO: soft-safe -> soft-unsafe lock
> order detected ]
..
That's probably some weird interaction with the simple polling patch,
so I think we can disregard it, unless it pops up again someday on
an unpatched kernel.

Well, at this point, I think the only way to make progress is for one of
the IDE/libata gurus to actually get hold of the same card you have,
meaning Alan Cox (best choice), or myself, or Bart. Or maybe Tejun.

Without that, this isn't likely to improve much.

Cheers

2007-06-11 20:36:42

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Mark Lord wrote:
> Russell King wrote:
>>
>> Before you do, it might help to build the ide-disk module and insert
>> that
>> as well?
>
> ARrrggghh!! Of course, that would explain the utter lack
> of disk partition check messages, now wouldn't it!
>
> Thanks Russell !
>

Doh! yes that would obviously help.
With this I can declare success!! I was able to read and write to the
card without any problems, although I did not try to stress it.

Jun 12 00:19:42 localhost kernel: pccard: PCMCIA card inserted into slot 0
Jun 12 00:19:42 localhost kernel: cs: memory probe
0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
Jun 12 00:19:42 localhost kernel: cs: memory probe
0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
0xcfa00000-0xd01fffff
Jun 12 00:19:42 localhost kernel: pcmcia: registering new device pcmcia0.0
Jun 12 00:19:42 localhost kernel: Uniform Multi-Platform E-IDE driver
Revision: 7.00alpha2
Jun 12 00:19:42 localhost kernel: ide: Assuming 33MHz system bus speed
for PIO modes; override with idebus=xx
Jun 12 00:19:45 localhost kernel: hda: Memory Card Adapter, CFA DISK drive
Jun 12 00:19:45 localhost kernel: ide0 at 0x4100-0x4107,0x410e on irq 3
Jun 12 00:19:45 localhost kernel: ide-cs: hda: Vpp = 0.0
Jun 12 00:19:45 localhost udevd-event[20730]: udev_rules_apply_format:
unknown format variable '$modalias'
Jun 12 00:19:45 localhost kernel: hda: max request size: 128KiB
Jun 12 00:19:45 localhost kernel: hda: 253696 sectors (129 MB) w/1KiB
Cache, CHS=991/16/16
Jun 12 00:19:45 localhost kernel: hda: hda1
Jun 12 00:19:48 localhost hald: mounted /dev/hda1 on behalf of uid 0

2007-06-11 22:54:49

by Mark Lord

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Robert de Rooy wrote:
> (after applying the ide-polling experimental patch)
>
> With this I can declare success!! I was able to read and write to the
> card without any problems, although I did not try to stress it.
>
> Jun 12 00:19:42 localhost kernel: pccard: PCMCIA card inserted into slot 0
> Jun 12 00:19:42 localhost kernel: cs: memory probe
> 0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
> Jun 12 00:19:42 localhost kernel: cs: memory probe
> 0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
> 0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
> 0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
> 0xcfa00000-0xd01fffff
> Jun 12 00:19:42 localhost kernel: pcmcia: registering new device pcmcia0.0
> Jun 12 00:19:42 localhost kernel: Uniform Multi-Platform E-IDE driver
> Revision: 7.00alpha2
> Jun 12 00:19:42 localhost kernel: ide: Assuming 33MHz system bus speed
> for PIO modes; override with idebus=xx
> Jun 12 00:19:45 localhost kernel: hda: Memory Card Adapter, CFA DISK drive
> Jun 12 00:19:45 localhost kernel: ide0 at 0x4100-0x4107,0x410e on irq 3
> Jun 12 00:19:45 localhost kernel: ide-cs: hda: Vpp = 0.0
> Jun 12 00:19:45 localhost udevd-event[20730]: udev_rules_apply_format:
> unknown format variable '$modalias'
> Jun 12 00:19:45 localhost kernel: hda: max request size: 128KiB
> Jun 12 00:19:45 localhost kernel: hda: 253696 sectors (129 MB) w/1KiB
> Cache, CHS=991/16/16
> Jun 12 00:19:45 localhost kernel: hda: hda1
> Jun 12 00:19:48 localhost hald: mounted /dev/hda1 on behalf of uid 0

Okay, Tejun / Bart / Alan:

This proves that the device does work correctly in most respects
except for interrupt delivery. The status bits are working and
it can be probed for, configured, and used.

So, next step might be to try and understand the interrupt mis-delivery
problem some more. I've lost the history of the original issue,
but we now know that everything except the actual interrupt seems good.

Cheers
--
Mark Lord
Real-Time Remedies Inc.
[email protected]

2007-06-12 03:24:37

by Tejun Heo

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Mark Lord wrote:
> Robert de Rooy wrote:
>> (after applying the ide-polling experimental patch)
>>
>> With this I can declare success!! I was able to read and write to the
>> card without any problems, although I did not try to stress it.
>>
>> Jun 12 00:19:42 localhost kernel: pccard: PCMCIA card inserted into
>> slot 0
>> Jun 12 00:19:42 localhost kernel: cs: memory probe
>> 0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
>> Jun 12 00:19:42 localhost kernel: cs: memory probe
>> 0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
>> 0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
>> 0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
>> 0xcfa00000-0xd01fffff
>> Jun 12 00:19:42 localhost kernel: pcmcia: registering new device
>> pcmcia0.0
>> Jun 12 00:19:42 localhost kernel: Uniform Multi-Platform E-IDE driver
>> Revision: 7.00alpha2
>> Jun 12 00:19:42 localhost kernel: ide: Assuming 33MHz system bus speed
>> for PIO modes; override with idebus=xx
>> Jun 12 00:19:45 localhost kernel: hda: Memory Card Adapter, CFA DISK
>> drive
>> Jun 12 00:19:45 localhost kernel: ide0 at 0x4100-0x4107,0x410e on irq 3
>> Jun 12 00:19:45 localhost kernel: ide-cs: hda: Vpp = 0.0
>> Jun 12 00:19:45 localhost udevd-event[20730]: udev_rules_apply_format:
>> unknown format variable '$modalias'
>> Jun 12 00:19:45 localhost kernel: hda: max request size: 128KiB
>> Jun 12 00:19:45 localhost kernel: hda: 253696 sectors (129 MB) w/1KiB
>> Cache, CHS=991/16/16
>> Jun 12 00:19:45 localhost kernel: hda: hda1
>> Jun 12 00:19:48 localhost hald: mounted /dev/hda1 on behalf of uid 0
>
> Okay, Tejun / Bart / Alan:
>
> This proves that the device does work correctly in most respects
> except for interrupt delivery. The status bits are working and
> it can be probed for, configured, and used.

libata can do most of this too by using ATA_FLAG_PIO_POLLING (doesn't
cover nodata commands tho).

--
tejun

2007-06-13 01:37:22

by Albert Lee

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

>
>
> libata can do most of this too by using ATA_FLAG_PIO_POLLING (doesn't
> cover nodata commands tho).
>

Hi Tejun,

Polling of nodata commands was fixed in:
http://marc.info/?l=linux-ide&m=116546272916399&w=2

--
albert

2007-06-14 09:39:51

by Tejun Heo

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Albert Lee wrote:
>>
>> libata can do most of this too by using ATA_FLAG_PIO_POLLING (doesn't
>> cover nodata commands tho).
>>
>
> Hi Tejun,
>
> Polling of nodata commands was fixed in:
> http://marc.info/?l=linux-ide&m=116546272916399&w=2

Right. Thanks for reminding me. :-)

--
tejun

2007-06-22 11:52:01

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Tejun Heo wrote:
> Albert Lee wrote:
>
>>> libata can do most of this too by using ATA_FLAG_PIO_POLLING (doesn't
>>> cover nodata commands tho).
>>>
>>>
>> Hi Tejun,
>>
>> Polling of nodata commands was fixed in:
>> http://marc.info/?l=linux-ide&m=116546272916399&w=2
>>
>
> Right. Thanks for reminding me. :-)
>
>

I did another try with libata pcmcia support using 2.6.22-rc5 which
already includes the nodata polling fix, in combination with
disable-dev_init_param-and-setxfermode-for-CFA.patch and the
timing-debug.patch

Jun 22 13:19:44 localhost kernel: pccard: PCMCIA card inserted into slot 1
Jun 22 13:19:44 localhost kernel: cs: memory probe
0xe8000000-0xefffffff: excluding 0xe8000000-0xefffffff
Jun 22 13:19:44 localhost kernel: cs: memory probe
0xc0200000-0xcfffffff: excluding 0xc0200000-0xc11fffff
0xc1a00000-0xc21fffff 0xc2a00000-0xc31fffff 0xc3a00000-0xcc1fffff
0xcca00000-0xcd1fffff 0xcda00000-0xce1fffff 0xcea00000-0xcf1fffff
0xcfa00000-0xd01fffff
Jun 22 13:19:44 localhost kernel: pcmcia: registering new device pcmcia1.0
Jun 22 13:19:44 localhost kernel: scsi2 : pata_pcmcia
Jun 22 13:19:44 localhost kernel: ata3: PATA max PIO0 cmd 0x00014100 ctl
0x0001410e bmdma 0x00000000 irq 0
Jun 22 13:19:44 localhost kernel: ata3: soft resetting port
Jun 22 13:19:44 localhost kernel: ata3: reset complete
Jun 22 13:19:44 localhost kernel: ata3.00: issuing IDENTIFY
Jun 22 13:19:45 localhost kernel: ata3.00: IDENTIFY complete
Jun 22 13:19:45 localhost kernel: ata3.00: CFA: Memory Card Adapter,
20011212, max PIO1
Jun 22 13:19:45 localhost kernel: ata3.00: 253696 sectors, multi 0: LBA
Jun 22 13:19:45 localhost kernel: ata3.00: issuing IDENTIFY
Jun 22 13:19:45 localhost kernel: ata3.00: IDENTIFY complete
Jun 22 13:19:45 localhost kernel: ata3.00: configured for PIO0
Jun 22 13:19:45 localhost kernel: ata3: EH complete
Jun 22 13:19:45 localhost kernel: scsi 2:0:0:0: Direct-Access
ATA Memory Card Adap 2001 PQ: 0 ANSI: 5
Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] 253696 512-byte
hardware sectors (130 MB)
Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] Write cache:
disabled, read cache: enabled, doesn't support DPO or FUA
Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] 253696 512-byte
hardware sectors (130 MB)
Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] Write cache:
disabled, read cache: enabled, doesn't support DPO or FUA
Jun 22 13:20:15 localhost kernel: sdb:<3>ata3.00: exception Emask 0x0
SAct 0x0 SErr 0x0 action 0x2 frozen
Jun 22 13:20:15 localhost kernel: ata3.00: cmd
20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
Jun 22 13:20:15 localhost kernel: res
40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Jun 22 13:20:15 localhost kernel: ata3: soft resetting port
Jun 22 13:20:15 localhost kernel: ata3: reset complete
Jun 22 13:20:15 localhost kernel: ATA: abnormal status 0x80 on port
0x00014107
Jun 22 13:20:15 localhost kernel: ATA: abnormal status 0x80 on port
0x00014107
Jun 22 13:20:15 localhost kernel: ATA: abnormal status 0x58 on port
0x00014107
Jun 22 13:20:15 localhost kernel: ata3.00: issuing IDENTIFY
Jun 22 13:20:15 localhost kernel: ATA: abnormal status 0x58 on port
0x00014107
Jun 22 13:20:15 localhost last message repeated 4 times
Jun 22 13:20:15 localhost kernel: ata3.00: IDENTIFY complete
Jun 22 13:20:15 localhost kernel: ata3.00: failed to IDENTIFY (I/O
error, err_mask=0x2)
Jun 22 13:20:15 localhost kernel: ata3.00: revalidation failed (errno=-5)
Jun 22 13:20:15 localhost kernel: ata3: failed to recover some devices,
retrying in 5 secs
Jun 22 13:20:20 localhost kernel: ata3: soft resetting port
Jun 22 13:20:20 localhost kernel: ata3: reset complete
Jun 22 13:20:20 localhost kernel: ATA: abnormal status 0x80 on port
0x00014107
Jun 22 13:20:20 localhost kernel: ATA: abnormal status 0x80 on port
0x00014107
Jun 22 13:20:20 localhost kernel: ATA: abnormal status 0x58 on port
0x00014107
Jun 22 13:20:20 localhost kernel: ata3.00: issuing IDENTIFY
Jun 22 13:20:20 localhost kernel: ATA: abnormal status 0x58 on port
0x00014107
Jun 22 13:20:20 localhost last message repeated 4 times
Jun 22 13:20:20 localhost kernel: ata3.00: IDENTIFY complete
Jun 22 13:20:20 localhost kernel: ata3.00: failed to IDENTIFY (I/O
error, err_mask=0x2)
Jun 22 13:20:20 localhost kernel: ata3.00: revalidation failed (errno=-5)
Jun 22 13:20:20 localhost kernel: ata3: failed to recover some devices,
retrying in 5 secs
Jun 22 13:20:25 localhost kernel: ata3: soft resetting port
Jun 22 13:20:25 localhost kernel: ata3: reset complete
Jun 22 13:20:25 localhost kernel: ATA: abnormal status 0xB8 on port
0x00014107
Jun 22 13:20:25 localhost kernel: ATA: abnormal status 0xB8 on port
0x00014107
Jun 22 13:20:25 localhost kernel: ATA: abnormal status 0x58 on port
0x00014107
Jun 22 13:20:25 localhost kernel: ata3.00: issuing IDENTIFY
Jun 22 13:20:25 localhost kernel: ATA: abnormal status 0x58 on port
0x00014107
Jun 22 13:20:25 localhost last message repeated 4 times
Jun 22 13:20:25 localhost kernel: ata3.00: IDENTIFY complete
Jun 22 13:20:25 localhost kernel: ata3.00: failed to IDENTIFY (I/O
error, err_mask=0x2)
Jun 22 13:20:25 localhost kernel: ata3.00: revalidation failed (errno=-5)
Jun 22 13:20:25 localhost kernel: ata3.00: disabled
Jun 22 13:20:26 localhost kernel: ata3: EH complete
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: end_request: I/O error, dev sdb, sector 0
Jun 22 13:20:26 localhost kernel: Buffer I/O error on device sdb,
logical block 0
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: end_request: I/O error, dev sdb, sector 0
Jun 22 13:20:26 localhost kernel: Buffer I/O error on device sdb,
logical block 0
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: end_request: I/O error, dev sdb, sector 0
Jun 22 13:20:26 localhost kernel: Buffer I/O error on device sdb,
logical block 0
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: end_request: I/O error, dev sdb, sector 0
Jun 22 13:20:26 localhost kernel: Buffer I/O error on device sdb,
logical block 0
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: end_request: I/O error, dev sdb, sector 0
Jun 22 13:20:26 localhost kernel: Buffer I/O error on device sdb,
logical block 0
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: end_request: I/O error, dev sdb, sector 0
Jun 22 13:20:26 localhost kernel: Buffer I/O error on device sdb,
logical block 0
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: end_request: I/O error, dev sdb, sector 0
Jun 22 13:20:26 localhost kernel: Buffer I/O error on device sdb,
logical block 0
Jun 22 13:20:26 localhost kernel: Dev sdb: unable to read RDB block 0
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: end_request: I/O error, dev sdb, sector 0
Jun 22 13:20:26 localhost kernel: Buffer I/O error on device sdb,
logical block 0
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: end_request: I/O error, dev sdb, sector 0
Jun 22 13:20:26 localhost kernel: Buffer I/O error on device sdb,
logical block 0
Jun 22 13:20:26 localhost kernel: unable to read partition table
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Attached SCSI
removable disk
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: Attached scsi generic sg2
type 0
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] READ CAPACITY failed
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Sense not available.
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Asking for cache
data failed
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Assuming drive
cache: write through
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] READ CAPACITY failed
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Sense not available.
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Asking for cache
data failed
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Assuming drive
cache: write through
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] READ CAPACITY failed
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Sense not available.
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Asking for cache
data failed
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Assuming drive
cache: write through
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] READ CAPACITY failed
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Sense not available.
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Asking for cache
data failed
Jun 22 13:20:26 localhost kernel: sd 2:0:0:0: [sdb] Assuming drive
cache: write through
Jun 22 13:20:27 localhost kernel: sd 2:0:0:0: [sdb] READ CAPACITY failed
Jun 22 13:20:27 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:27 localhost kernel: sd 2:0:0:0: [sdb] Sense not available.
Jun 22 13:20:27 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jun 22 13:20:27 localhost kernel: sd 2:0:0:0: [sdb] Asking for cache
data failed
Jun 22 13:20:27 localhost kernel: sd 2:0:0:0: [sdb] Assuming drive
cache: write through
Jun 22 13:20:27 localhost kernel: sd 2:0:0:0: [sdb] READ CAPACITY failed
Jun 22 13:20:27 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:27 localhost kernel: sd 2:0:0:0: [sdb] Sense not available.
Jun 22 13:20:27 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jun 22 13:20:27 localhost kernel: sd 2:0:0:0: [sdb] Asking for cache
data failed
Jun 22 13:20:27 localhost kernel: sd 2:0:0:0: [sdb] Assuming drive
cache: write through
Jun 22 13:20:43 localhost kernel: sd 2:0:0:0: [sdb] READ CAPACITY failed
Jun 22 13:20:43 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:43 localhost kernel: sd 2:0:0:0: [sdb] Sense not available.
Jun 22 13:20:43 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jun 22 13:20:43 localhost kernel: sd 2:0:0:0: [sdb] Asking for cache
data failed
Jun 22 13:20:43 localhost kernel: sd 2:0:0:0: [sdb] Assuming drive
cache: write through
Jun 22 13:20:43 localhost kernel: sd 2:0:0:0: [sdb] READ CAPACITY failed
Jun 22 13:20:43 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK
Jun 22 13:20:43 localhost kernel: sd 2:0:0:0: [sdb] Sense not available.
Jun 22 13:20:43 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jun 22 13:20:43 localhost kernel: sd 2:0:0:0: [sdb] Asking for cache
data failed
Jun 22 13:20:43 localhost kernel: sd 2:0:0:0: [sdb] Assuming drive
cache: write through
Jun 22 13:20:48 localhost kernel: pccard: card ejected from slot 1
Jun 22 13:20:48 localhost kernel: sd 2:0:0:0: [sdb] Stopping disk
Jun 22 13:20:48 localhost kernel: sd 2:0:0:0: [sdb] START_STOP FAILED
Jun 22 13:20:48 localhost kernel: sd 2:0:0:0: [sdb] Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK

2007-06-22 13:33:14

by Mark Lord

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Robert de Rooy wrote:
>
> I did another try with libata pcmcia support using 2.6.22-rc5 which
> already includes the nodata polling fix, in combination with
> disable-dev_init_param-and-setxfermode-for-CFA.patch and the
> timing-debug.patch
...
> Jun 22 13:19:44 localhost kernel: ata3.00: issuing IDENTIFY
> Jun 22 13:19:45 localhost kernel: ata3.00: IDENTIFY complete
> Jun 22 13:19:45 localhost kernel: ata3.00: CFA: Memory Card Adapter,
> 20011212, max PIO1
> Jun 22 13:19:45 localhost kernel: ata3.00: 253696 sectors, multi 0: LBA
> Jun 22 13:19:45 localhost kernel: ata3.00: issuing IDENTIFY
> Jun 22 13:19:45 localhost kernel: ata3.00: IDENTIFY complete
> Jun 22 13:19:45 localhost kernel: ata3.00: configured for PIO0
> Jun 22 13:19:45 localhost kernel: ata3: EH complete
> Jun 22 13:19:45 localhost kernel: scsi 2:0:0:0: Direct-Access
> ATA Memory Card Adap 2001 PQ: 0 ANSI: 5
> Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] 253696 512-byte
> hardware sectors (130 MB)
> Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
> Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] Write cache:
> disabled, read cache: enabled, doesn't support DPO or FUA
> Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] 253696 512-byte
> hardware sectors (130 MB)
> Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
> Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] Write cache:
> disabled, read cache: enabled, doesn't support DPO or FUA
> Jun 22 13:20:15 localhost kernel: sdb:<3>ata3.00: exception Emask 0x0
> SAct 0x0 SErr 0x0 action 0x2 frozen
> Jun 22 13:20:15 localhost kernel: ata3.00: cmd
> 20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
> Jun 22 13:20:15 localhost kernel: res
> 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
> Jun 22 13:20:15 localhost kernel: ata3: soft resetting port
> Jun 22 13:20:15 localhost kernel: ata3: reset complete
> Jun 22 13:20:15 localhost kernel: ATA: abnormal status 0x80 on port
> 0x00014107
> Jun 22 13:20:15 localhost kernel: ATA: abnormal status 0x80 on port
> 0x00014107
> Jun 22 13:20:15 localhost kernel: ATA: abnormal status 0x58 on port
> 0x00014107
> Jun 22 13:20:15 localhost kernel: ata3.00: issuing IDENTIFY
> Jun 22 13:20:15 localhost kernel: ATA: abnormal status 0x58 on port
> 0x00014107
...

Mmm.. I don't know about the first failure there,
but after that it gets into the "stuck DRQ" state
which libata makes no attempt to handle at present.

Here is an additional patch, which hopefully will apply to your kernel
to handle the stuck DRQ. You may need to hand tweak it, though,
as I'm not entirely certain as to where to place the new call
to ata_drain_fifo(). It's currently on an error recovery path
which works for DMA, but your device is using PIO. It may still get
hit as-is, but.. Give it a try.


--- linux/drivers/ata/libata-sff.c.orig 2007-04-26 12:02:46.000000000 -0400
+++ linux/drivers/ata/libata-sff.c 2007-04-29 08:29:27.000000000 -0400
@@ -413,6 +413,24 @@
ap->ops->irq_on(ap);
}

+static void ata_drain_fifo (struct ata_port *ap, struct ata_queued_cmd *qc)
+{
+ u8 stat = ata_chk_status(ap);
+ /*
+ * Try to clear stuck DRQ if necessary.
+ */
+ if ((stat & ATA_DRQ) && (!qc || qc->dma_dir != DMA_TO_DEVICE)) {
+ unsigned int i, limit = 512;
+ printk("Draining up to %u words from data FIFO.\n", limit);
+ for (i = 0; i < limit ; ++i) {
+ ioread16(ap->ioaddr.data_addr);
+ if (!(ata_chk_status(ap) & ATA_DRQ))
+ break;
+ }
+ printk("Drained %u/%u words.\n", i, limit);
+ }
+}
+
/**
* ata_bmdma_drive_eh - Perform EH with given methods for BMDMA controller
* @ap: port to handle error for
@@ -469,7 +487,7 @@
}

ata_altstatus(ap);
- ata_chk_status(ap);
+ ata_drain_fifo(ap, qc);
ap->ops->irq_clear(ap);

spin_unlock_irqrestore(ap->lock, flags);

2007-06-25 04:05:15

by Albert Lee

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Mark Lord wrote:
> Robert de Rooy wrote:
>
>>
>> I did another try with libata pcmcia support using 2.6.22-rc5 which
>> already includes the nodata polling fix, in combination with
>> disable-dev_init_param-and-setxfermode-for-CFA.patch and the
>> timing-debug.patch
>
> ...
>
>> Jun 22 13:19:44 localhost kernel: ata3.00: issuing IDENTIFY
>> Jun 22 13:19:45 localhost kernel: ata3.00: IDENTIFY complete
>> Jun 22 13:19:45 localhost kernel: ata3.00: CFA: Memory Card Adapter,
>> 20011212, max PIO1
>> Jun 22 13:19:45 localhost kernel: ata3.00: 253696 sectors, multi 0: LBA
>> Jun 22 13:19:45 localhost kernel: ata3.00: issuing IDENTIFY
>> Jun 22 13:19:45 localhost kernel: ata3.00: IDENTIFY complete
>> Jun 22 13:19:45 localhost kernel: ata3.00: configured for PIO0
>> Jun 22 13:19:45 localhost kernel: ata3: EH complete
>> Jun 22 13:19:45 localhost kernel: scsi 2:0:0:0: Direct-Access
>> ATA Memory Card Adap 2001 PQ: 0 ANSI: 5
>> Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] 253696 512-byte
>> hardware sectors (130 MB)
>> Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
>> Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] Write cache:
>> disabled, read cache: enabled, doesn't support DPO or FUA
>> Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] 253696 512-byte
>> hardware sectors (130 MB)
>> Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
>> Jun 22 13:19:45 localhost kernel: sd 2:0:0:0: [sdb] Write cache:
>> disabled, read cache: enabled, doesn't support DPO or FUA
>> Jun 22 13:20:15 localhost kernel: sdb:<3>ata3.00: exception Emask 0x0
>> SAct 0x0 SErr 0x0 action 0x2 frozen
>> Jun 22 13:20:15 localhost kernel: ata3.00: cmd
>> 20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in
>> Jun 22 13:20:15 localhost kernel: res
>> 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
>> Jun 22 13:20:15 localhost kernel: ata3: soft resetting port
>> Jun 22 13:20:15 localhost kernel: ata3: reset complete
>> Jun 22 13:20:15 localhost kernel: ATA: abnormal status 0x80 on port
>> 0x00014107
>> Jun 22 13:20:15 localhost kernel: ATA: abnormal status 0x80 on port
>> 0x00014107
>> Jun 22 13:20:15 localhost kernel: ATA: abnormal status 0x58 on port
>> 0x00014107
>> Jun 22 13:20:15 localhost kernel: ata3.00: issuing IDENTIFY
>> Jun 22 13:20:15 localhost kernel: ATA: abnormal status 0x58 on port
>> 0x00014107
>
> ...
>
> Mmm.. I don't know about the first failure there,
> but after that it gets into the "stuck DRQ" state
> which libata makes no attempt to handle at present.
>

It seems the pata_pcmcia driver is using IRQ driven PIO. Maybe Robert
could try the following pio_polling patch first.

--
albert

---

--- libata-dev/drivers/ata/pata_pcmcia.c~ 2007-06-12 16:44:43.000000000 +0800
+++ libata-dev/drivers/ata/pata_pcmcia.c 2007-06-25 11:53:37.000000000 +0800
@@ -299,7 +299,7 @@ next_entry:

ap->ops = &pcmcia_port_ops;
ap->pio_mask = 1; /* ISA so PIO 0 cycles */
- ap->flags |= ATA_FLAG_SLAVE_POSS;
+ ap->flags |= ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_POLLING;
ap->ioaddr.cmd_addr = io_addr;
ap->ioaddr.altstatus_addr = ctl_addr;
ap->ioaddr.ctl_addr = ctl_addr;





2007-06-25 09:32:00

by Robert de Rooy

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Albert Lee wrote:
> Mark Lord wrote:
>
>> ...
>>
>> Mmm.. I don't know about the first failure there,
>> but after that it gets into the "stuck DRQ" state
>> which libata makes no attempt to handle at present.
>>
>>
>
> It seems the pata_pcmcia driver is using IRQ driven PIO. Maybe Robert
> could try the following pio_polling patch first.
>

I did not get the chance to try Marks patch, but the pio_polling patch
from Albert works!!

2007-06-25 10:16:21

by Albert Lee

[permalink] [raw]
Subject: Re: libata and legacy ide pcmcia failure

Robert de Rooy wrote:
> Albert Lee wrote:
>
>> Mark Lord wrote:
>>
>>
>>> ...
>>>
>>> Mmm.. I don't know about the first failure there,
>>> but after that it gets into the "stuck DRQ" state
>>> which libata makes no attempt to handle at present.
>>>
>>>
>>
>>
>> It seems the pata_pcmcia driver is using IRQ driven PIO. Maybe Robert
>> could try the following pio_polling patch first.
>>
>
>
> I did not get the chance to try Marks patch, but the pio_polling patch
> from Albert works!!
>
>

The patch just workarounds the "lost irq" problem by polling; not real
fix. We still need to find out why irq is lost per Mark's comment:

"This proves that the device does work correctly in most respects
except for interrupt delivery. The status bits are working and
it can be probed for, configured, and used."

"So, next step might be to try and understand the interrupt mis-delivery
problem some more. I've lost the history of the original issue,
but we now know that everything except the actual interrupt seems good."

I am not familiar with the PCMCIA interrupt delivery. It seems the
"Dazzle 4in1 Card Adapter" works under windows but somehow lost irq
under both IDE and libata. Maybe Alan/Bart or the PCMCIA developers
know better...
--
albert