{
int i;
+ /*
+ * Runs the fixup only for the first IDE controller
+ * (Shai Fultheim - shai@ftcon.com)
+ */
+ static int called = 0;
+ if (called)
+ return;
+ called = 1;
+
/*
* There exist PCI IDE controllers which have utter garbage
* in first four base registers. Ignore that.
fixed_val = rev < 0xC1 ? 0x1F01FF01 : 0x9F01FF01;
pci_read_config_dword(dev, 0x6c, &val);
- if (val != fixed_val) {
+
+ /*
+ * Apply fixup only if C1 Halt Disconnect is enabled
+ * (bit28) because it is not supported on some boards.
+ */
+ if ((val & (1 << 28)) && val != fixed_val) {
printk(KERN_WARNING "PCI: nForce2 C1 Halt Disconnect fixup\n");
pci_write_config_dword(dev, 0x6c, fixed_val);
}