Skip to contentSkip to conversation

PDC202XX_OLD broken

DISCUSSION Alan Pope 3 participants 7 messages Dec 6, 2004 – Dec 8, 2004 libata

lore
Share & tools
lore

Alan Pope

author
#0 lore raw

Added a "Seagate ST3200822A Barracuda 7200.7 Plus 200GB" disk to my main PC which uses a with "Promise PDC20265 (FastTrak100 Lite/Ultra100) (rev 02)" controller.

I get these when placing the disk under any load (DMA enabled)

hde: dma_intr: status=0xff { Busy }

ide: failed opcode was: unknown
hde: DMA disabled
PDC202XX: Primary channel reset.
PDC202XX: Secondary channel reset.

(a number of times)

ide2: reset timed-out, status=0xff
end_request: I/O error, dev hde, sector 11776 Buffer I/O error on device hde, logical block 1472

(many times)

Any clues, greatfully received.

I've tried under 2.6.8 through 2.6.9-ac9 & 2.6.10-rc2 with the same effect.

Thanks,
Al.

author
#1 lore raw

Added a "Seagate ST3200822A Barracuda 7200.7 Plus 200GB" disk to my main PC which uses a with "Promise PDC20265 (FastTrak100 Lite/Ultra100) (rev 02)" controller.

I get these when placing the disk under any load (DMA enabled)

hde: dma_intr: status=0xff { Busy }

ide: failed opcode was: unknown
hde: DMA disabled
PDC202XX: Primary channel reset.
PDC202XX: Secondary channel reset.

(a number of times)

ide2: reset timed-out, status=0xff
end_request: I/O error, dev hde, sector 11776 Buffer I/O error on device hde, logical block 1472

(many times)

Any clues, greatfully received.

I've tried under 2.6.8 through 2.6.9-ac9 & 2.6.10-rc2 with the same effect.

Thanks,
Al.

#2 lore raw
In reply to Alan Pope
Quoted 3 lines · Alan Pope

Added a "Seagate ST3200822A Barracuda 7200.7 Plus 200GB" disk to my main PC which uses a with "Promise PDC20265 (FastTrak100 Lite/Ultra100) (rev 02)" controller.

Does it behave attached to a different disk controller ?

author
#3 lore raw
Quoted 8 lines · Alan Cox
Quoted 3 lines · Alan Pope

Added a "Seagate ST3200822A Barracuda 7200.7 Plus 200GB" disk to my main PC which uses a with "Promise PDC20265 (FastTrak100 Lite/Ultra100) (rev 02)" controller.

Does it behave attached to a different disk controller ?

Thanks for the reply Alan, much appreciated.

No. I can confirm that when booted to Linux 2.6.7, plugged into a VIA (onboard) VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev
06) it's does NOT exhibit the same problem. It's in DMA ATA33 mode on that controller.

I have thrashed it with many dds of /dev/zero to the disk whilst copying files around, and it's fine.

I've got some details at http://www.popey.com/promise if that helps.

Cheers,
Al.

#4 lore raw
In reply to Alan Cox

last mail and http://www.popey.com/promise helped a lot

You are using 40c cable instead of 80c one.
Thus transfer rate is limited to UDMA33.

Moreover pdc202xx_old has a bug in cable detection code. pdc202xx_old_cable_detect() always returns '0' (which means 80c cable) due to a sloppy coding - result of CIS & mask is truncated to 8 bits although CIS holds cable info in bits 10-11.

Does this fix work for you?

pdc202xx_old.c renamed from pdc202xx_old.c.orig +1 -1
@@ -230,7 +230,7 @@
 {
 	u16 CIS = 0, mask = (hwif->channel) ? (1<<11) : (1<<10);
 	pci_read_config_word(hwif->pci_dev, 0x50, &CIS);
-	return ((u8)(CIS & mask));
+	return (CIS & mask) ? 1 : 0;
 }
 
 /*
author
#5 lore raw
Quoted 3 lines · Bartlomiej Zolnierkiewicz

You are using 40c cable instead of 80c one.
Thus transfer rate is limited to UDMA33.

No, I'm using an 80c cable. I have even gone out and bought a new 80c one just to make sure the cable isn't broken. I have also got two identical disks, and experience exactly the same problem on both.

I booted with "ide2=dma" because it was booting with the disk in pio mode.

Quoted 7 lines

Moreover pdc202xx_old has a bug in cable detection code. pdc202xx_old_cable_detect() always returns '0' (which means 80c cable) due to a sloppy coding - result of CIS & mask is truncated to 8 bits although CIS holds cable info in bits 10-11.

Does this fix work for you?

Not tried it, but it wouldn't help me would it? I *do* have an 80c cable, and the disk does show up in dmesg as a UDMA100 disk..

This is what happens when I thrash it, note my /home/alan is on another non-UDMA100 disk on a separate controller.

# time cp -Rvp /home/alan/* temp

ide: failed opcode was: unknown
hde: DMA disabled
PDC202XX: Primary channel reset.
PDC202XX: Secondary channel reset.

(then lots of these)

end_request: I/O error, dev hde, sector 145225487
end_request: I/O error, dev hde, sector 145225495
end_request: I/O error, dev hde, sector 145225503
end_request: I/O error, dev hde, sector 145225511
end_request: I/O error, dev hde, sector 145225519
end_request: I/O error, dev hde, sector 145225527
end_request: I/O error, dev hde, sector 145225535

EXT3-fs error (device hde1) in ext3_prepare_write: IO failure EXT3-fs error (device hde1) in start_transaction: Journal has aborted

printk: 2018 messages suppressed.
Buffer I/O error on device hde1, logical block 5
lost page write due to I/O error on hde1
end_request: I/O error, dev hde, sector 183

Any ideas?
Cheers,
Al.

#6 lore raw
Quoted 9 lines · Alan Pope
Quoted 3 lines · Bartlomiej Zolnierkiewicz

You are using 40c cable instead of 80c one.
Thus transfer rate is limited to UDMA33.

No, I'm using an 80c cable. I have even gone out and bought a new 80c one just to make sure the cable isn't broken. I have also got two identical disks, and experience exactly the same problem on both.

Ah, my mistake, you have 40c cable connected to VIA not Promise...

Quoted 1 line

I booted with "ide2=dma" because it was booting with the disk in pio mode.

If you are talking about:

ide3: BM-DMA at 0xd008-0xd00f, BIOS settings: hdg:pio, hdh:pio

it reports BIOS settings not the ones used by driver, no need for "ide=dma2" if you have CONFIG_IDEDMA_PCI_AUTO=y.

Quoted 10 lines
Quoted 7 lines

Moreover pdc202xx_old has a bug in cable detection code. pdc202xx_old_cable_detect() always returns '0' (which means 80c cable) due to a sloppy coding - result of CIS & mask is truncated to 8 bits although CIS holds cable info in bits 10-11.

Does this fix work for you?

Not tried it, but it wouldn't help me would it? I *do* have an 80c cable, and the disk does show up in dmesg as a UDMA100 disk..

It wouldn't, it must be another bug.