linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pci-quirks: Unhide 'Overflow' device on i828{6,7}5P/PE chipsets
@ 2008-12-23 21:50 Michał Mirosław
  2008-12-23 23:35 ` Robert Hancock
  2009-01-01 19:02 ` [PATCH 2.6.28 1/3] PCI-quirks: Unhide MCH5/6 memory controller configuration device Michał Mirosław
  0 siblings, 2 replies; 12+ messages in thread
From: Michał Mirosław @ 2008-12-23 21:50 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: linux-kernel, linux-pci, bluesmoke-devel

As I found out from EDAC driver sources for i82875P some BIOSes for
i82875P/PE hide 'overflow' device 6. The same thing happens for
i82865P/PE chipsets.

After testing this patch for couple of days on my laptop (i82856P)
it looks like something is resetting device 0 (MCH) config register
0xF4 to zero and effectively disabling the device again. The delay
looks random to me. I can easily update the register using
'hexedit /sys/bus/pci/devices/0000\:00\:00.0/config' and see
correct values in lspci output afterwards.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

diff -urN linux-2.6.27.7-brfix1-nvpid/drivers/pci/quirks.c pci-quirks/drivers/pci/quirks.c
--- linux-2.6.27.7-brfix1-nvpid/drivers/pci/quirks.c	2008-10-10 00:13:53.000000000 +0200
+++ pci-quirks/drivers/pci/quirks.c	2008-12-06 22:18:46.000000000 +0100
@@ -2007,3 +2008,25 @@
 			quirk_msi_intx_disable_bug);
 
 #endif /* CONFIG_PCI_MSI */
+
+/* Originally in EDAC sources for i82875P:
+ * Intel tells BIOS developers to hide device 6 which
+ * configures the overflow device access containing
+ * the DRBs - this is where we expose device 6.
+ * http://www.x86-secret.com/articles/tweak/pat/patsecrets-2.htm
+ */
+static void __devinit quirk_unhide_mch_memory_controller_dev6(struct pci_dev *dev)
+{
+	u8 reg;
+
+	if (pci_read_config_byte(dev, 0xF4, &reg) == 0 && !(reg & 0x02)) {
+		dev_info(&dev->dev, "Enabling MCH Memory Controller 'Overflow' Device");
+		pci_write_config_byte(dev, 0xF4, reg | 0x02);
+	}
+}
+
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82865_HB,
+			quirk_unhide_mch_memory_controller_dev6);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82875_HB,
+			quirk_unhide_mch_memory_controller_dev6);
+

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-01-06 20:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-23 21:50 [PATCH] pci-quirks: Unhide 'Overflow' device on i828{6,7}5P/PE chipsets Michał Mirosław
2008-12-23 23:35 ` Robert Hancock
2008-12-23 23:54   ` Michał Mirosław
2009-01-01 19:02 ` [PATCH 2.6.28 1/3] PCI-quirks: Unhide MCH5/6 memory controller configuration device Michał Mirosław
2009-01-01 19:05   ` [PATCH 2.6.28 2/3] EDAC: Use 'overflow' device for binding i82875 EDAC driver Michał Mirosław
2009-01-01 19:06   ` [PATCH 2.6.28 3/3] EDAC: Add support for i82865P/PE chipsets Michał Mirosław
2009-01-05 19:20   ` [PATCH 2.6.28 1/3] PCI-quirks: Unhide MCH5/6 memory controller configuration device Jesse Barnes
2009-01-05 20:28     ` Michał Mirosław
2009-01-05 20:30       ` Michał Mirosław
2009-01-05 21:02         ` Jesse Barnes
2009-01-06 19:02         ` Bjorn Helgaas
2009-01-06 20:21           ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).