The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] Fix 82875 PCI setup
@ 2007-03-29 16:16 Adam Jackson
  2007-03-29 17:37 ` Henrique de Moraes Holschuh
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Jackson @ 2007-03-29 16:16 UTC (permalink / raw)
  To: linux-kernel

From: John Feeney <jfeeney@redhat.com>

The 82875 EDAC driver enables an otherwise-hidden PCI device, but
doesn't register it as a PCI device properly.  Therefore, the device
list in /proc/bus/pci/devices is different than the tree in 
/sys/bus/pci. This usually manifests as the X server failing to start,
since it expects the two lists to be consistent.

Signed-off-by: Adam Jackson <ajackson@redhat.com>

--- linux-2.6.18.noarch/drivers/edac/i82875p_edac.c~
+++ linux-2.6.18.noarch/drivers/edac/i82875p_edac.c
@@ -261,10 +261,6 @@ static void i82875p_check(struct mem_ctl
 	i82875p_process_error_info(mci, &info, 1);
 }
 
-#ifdef CONFIG_PROC_FS
-extern int pci_proc_attach_device(struct pci_dev *);
-#endif
-
 /* Return 0 on success or 1 on failure. */
 static int i82875p_setup_overfl_dev(struct pci_dev *pdev,
 		struct pci_dev **ovrfl_pdev, void __iomem **ovrfl_window)
@@ -287,17 +283,12 @@ static int i82875p_setup_overfl_dev(stru
 
 		if (dev == NULL)
 			return 1;
+
+        	pci_bus_add_device(dev);
 	}
 
 	*ovrfl_pdev = dev;
 
-#ifdef CONFIG_PROC_FS
-	if ((dev->procent == NULL) && pci_proc_attach_device(dev)) {
-		i82875p_printk(KERN_ERR, "%s(): Failed to attach overflow "
-			       "device\n", __func__);
-		return 1;
-	}
-#endif  /* CONFIG_PROC_FS */
 	if (pci_enable_device(dev)) {
 		i82875p_printk(KERN_ERR, "%s(): Failed to enable overflow "
 			       "device\n", __func__);




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

* Re: [PATCH] Fix 82875 PCI setup
  2007-03-29 16:16 [PATCH] Fix 82875 PCI setup Adam Jackson
@ 2007-03-29 17:37 ` Henrique de Moraes Holschuh
  0 siblings, 0 replies; 2+ messages in thread
From: Henrique de Moraes Holschuh @ 2007-03-29 17:37 UTC (permalink / raw)
  To: Adam Jackson; +Cc: linux-kernel

On Thu, 29 Mar 2007, Adam Jackson wrote:
> The 82875 EDAC driver enables an otherwise-hidden PCI device, but
> doesn't register it as a PCI device properly.  Therefore, the device
> list in /proc/bus/pci/devices is different than the tree in 
> /sys/bus/pci. This usually manifests as the X server failing to start,
> since it expects the two lists to be consistent.

Just a note: when EDAC needs to unhide the overflow configuration space of
the 82875, it is because the BIOS hid it.  And some BIOSes actually reserve
the area of the hidden device in the memory map/acpi tables/whatever.
Intel's D875PBZ motherboard does this.  EDAC can and does enable the
overflow device, but it might fail to reserve that region because of that
the BIOS did (and that is not a problem, in fact it is expected behaviour).

I don't know if this affects this patch in any way.  If it doesn't just
delete this email.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

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

end of thread, other threads:[~2007-03-29 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-29 16:16 [PATCH] Fix 82875 PCI setup Adam Jackson
2007-03-29 17:37 ` Henrique de Moraes Holschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox