Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', 'x86/crashdump', 'x86...
[sfrench/cifs-2.6.git] / drivers / ide / amd74xx.c
index 81ec73134edacfead9286aa479c0a73f1526de05..c6bcd3014a29ec7891b3e11543cd6195ff30e985 100644 (file)
@@ -3,7 +3,7 @@
  * IDE driver for Linux.
  *
  * Copyright (c) 2000-2002 Vojtech Pavlik
- * Copyright (c) 2007 Bartlomiej Zolnierkiewicz
+ * Copyright (c) 2007-2008 Bartlomiej Zolnierkiewicz
  *
  * Based on the work of:
  *      Andre Hedrick
@@ -263,6 +263,15 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_
                        d.udma_mask = ATA_UDMA5;
        }
 
+       /*
+        * It seems that on some nVidia controllers using AltStatus
+        * register can be unreliable so default to Status register
+        * if the device is in Compatibility Mode.
+        */
+       if (dev->vendor == PCI_VENDOR_ID_NVIDIA &&
+           ide_pci_is_in_compatibility_mode(dev))
+               d.host_flags |= IDE_HFLAG_BROKEN_ALTSTATUS;
+
        printk(KERN_INFO "%s %s: UDMA%s controller\n",
                d.name, pci_name(dev), amd_dma[fls(d.udma_mask) - 1]);