]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/pci/ops-mace.c
autofs4: collect version check return
[linux-2.6-omap-h63xx.git] / arch / mips / pci / ops-mace.c
index fe54514493044d8a9c70d9686518617531838d23..1cfb5588699fb6764f0793db6f47512167943430 100644 (file)
@@ -42,6 +42,10 @@ static int
 mace_pci_read_config(struct pci_bus *bus, unsigned int devfn,
                     int reg, int size, u32 *val)
 {
+       u32 control = mace->pci.control;
+
+       /* disable master aborts interrupts during config read */
+       mace->pci.control = control & ~MACEPCI_CONTROL_MAR_INT;
        mace->pci.config_addr = mkaddr(bus, devfn, reg);
        switch (size) {
        case 1:
@@ -54,6 +58,16 @@ mace_pci_read_config(struct pci_bus *bus, unsigned int devfn,
                *val = mace->pci.config_data.l;
                break;
        }
+       /* ack possible master abort */
+       mace->pci.error &= ~MACEPCI_ERROR_MASTER_ABORT;
+       mace->pci.control = control;
+       /*
+        * someone forgot to set the ultra bit for the onboard
+        * scsi chips; we fake it here
+        */
+       if (bus->number == 0 && reg == 0x40 && size == 4 &&
+           (devfn == (1 << 3) || devfn == (2 << 3)))
+               *val |= 0x1000;
 
        DPRINTK("read%d: reg=%08x,val=%02x\n", size * 8, reg, *val);