]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/pci/quirks.c
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[net-next-2.6.git] / drivers / pci / quirks.c
index 857ae01734a66156c8abb92335be91cc674964a0..f5c63fe9db5c5b6666001ae03a1a4c561c644986 100644 (file)
@@ -226,6 +226,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,        PCI_DEVICE_ID_INTEL_82439TX,    quir
  *     VIA Apollo KT133 needs PCI latency patch
  *     Made according to a windows driver based patch by George E. Breese
  *     see PCI Latency Adjust on http://www.viahardware.com/download/viatweak.shtm
+ *     and http://www.georgebreese.com/net/software/#PCI
  *      Also see http://www.au-ja.org/review-kt133a-1-en.phtml for
  *      the info on which Mr Breese based his work.
  *
@@ -1016,7 +1017,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TOSHIBA,   0x605,  quirk_transparent_bridge)
 /*
  * Common misconfiguration of the MediaGX/Geode PCI master that will
  * reduce PCI bandwidth from 70MB/s to 25MB/s.  See the GXM/GXLV/GX1
- * datasheets found at http://www.national.com/ds/GX for info on what
+ * datasheets found at http://www.national.com/analog for info on what
  * these bits do.  <christer@weinigel.se>
  */
 static void quirk_mediagx_master(struct pci_dev *dev)
@@ -2296,6 +2297,37 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,
                        PCI_DEVICE_ID_NVIDIA_NVENET_15,
                        nvenet_msi_disable);
 
+/*
+ * Some versions of the MCP55 bridge from nvidia have a legacy irq routing
+ * config register.  This register controls the routing of legacy interrupts
+ * from devices that route through the MCP55.  If this register is misprogramed
+ * interrupts are only sent to the bsp, unlike conventional systems where the
+ * irq is broadxast to all online cpus.  Not having this register set
+ * properly prevents kdump from booting up properly, so lets make sure that
+ * we have it set correctly.
+ * Note this is an undocumented register.
+ */
+static void __devinit nvbridge_check_legacy_irq_routing(struct pci_dev *dev)
+{
+       u32 cfg;
+
+       pci_read_config_dword(dev, 0x74, &cfg);
+
+       if (cfg & ((1 << 2) | (1 << 15))) {
+               printk(KERN_INFO "Rewriting irq routing register on MCP55\n");
+               cfg &= ~((1 << 2) | (1 << 15));
+               pci_write_config_dword(dev, 0x74, cfg);
+       }
+}
+
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,
+                       PCI_DEVICE_ID_NVIDIA_MCP55_BRIDGE_V0,
+                       nvbridge_check_legacy_irq_routing);
+
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,
+                       PCI_DEVICE_ID_NVIDIA_MCP55_BRIDGE_V4,
+                       nvbridge_check_legacy_irq_routing);
+
 static int __devinit ht_check_msi_mapping(struct pci_dev *dev)
 {
        int pos, ttl = 48;