diff -u --recursive linux-2.4.20/drivers/ide/pdc202xx.c linux-2.4.20-zh/drivers/ide/pdc202xx.c
--- linux-2.4.20/drivers/ide/pdc202xx.c Sat Aug 3 04:39:44 2002
+++ linux-2.4.20-zh/drivers/ide/pdc202xx.c Mon Dec 23 21:32:53 2002
@@ -1121,6 +1121,10 @@
{
unsigned short mask = (hwif->channel) ? (1<<11) : (1<<10);
unsigned short CIS;
+ struct pci_dev *dev = hwif->pci_dev;
+ unsigned long high_16 = pci_resource_start(dev, 4);
+ unsigned long indexreg = high_16 + (hwif->channel ? 0x09 : 0x01);
+ unsigned long datareg = (indexreg + 2);
switch(hwif->pci_dev->device) {
case PCI_DEVICE_ID_PROMISE_20276:
@@ -1128,8 +1132,8 @@
case PCI_DEVICE_ID_PROMISE_20269:
case PCI_DEVICE_ID_PROMISE_20268:
case PCI_DEVICE_ID_PROMISE_20270:
- OUT_BYTE(0x0b, (hwif->dma_base + 1));
- return (!(IN_BYTE((hwif->dma_base + 3)) & 0x04));
+ OUT_BYTE(0x0b, indexreg);
+ return (!(IN_BYTE(datareg) & 0x04));
/* check 80pin cable */
default:
pci_read_config_word(hwif->pci_dev, 0x50, &CIS);
-- Best regards, Nikolai Zhubr
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/