Re: libata and legacy ide pcmcia failure

From: Albert Lee
Date: Mon Jun 25 2007 - 00:05:15 EST


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;





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/