Re: PDC202XX_OLD broken

From: Bartlomiej Zolnierkiewicz
Date: Tue Dec 07 2004 - 16:00:41 EST


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.orig 2004-11-07 03:14:09.000000000 +0100
+++ pdc202xx_old.c 2004-12-07 15:38:13.644921160 +0100
@@ -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;
}

/*
-
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/