[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bluesmoke-devel
Subject:    [PATCH] i82875p_edac: Fix overflow device resource setup
From:       Jarkko Lavinen <jlavi () iki ! fi>
Date:       2008-11-28 21:09:51
Message-ID: 20081128210951.GA25412 () piipiip ! net
[Download RAW message or body]

When I do "modprobe i82875p_edac" on my Asus P4C800 MB on kernels
2.6.26 or later, the module load fails due to BAR 0 collision. On
2.6.25 the module loads just fine.

The overflow device on the MB seems to be hidden and its resources are
not allocated at normal PCI bus init. Log shows the missing resource
problem:

  EDAC DEBUG: i82875p_probe1()
  PCI: 0000:00:06.0 reg 10 32bit mmio: [fecf0000, fecf0fff]
  pci 0000:00:06.0: device not available because of BAR 0
[0xfecf0000-0xfecf0fff] collisions
  EDAC i82875p: i82875p_setup_overfl_dev(): Failed to enable overflow
device

The patch below fixes this by calling pci_bus_assign_resources() after
the overflow device is revealed and added to the bus. With this patch
I am again able to load and use the module.

Cheers
Jarkko Lavinen

>From 56c9fc7629b459f04f2b9942843a806b908f7c0d Mon Sep 17 00:00:00 2001
From: Jarkko Lavinen <jlavi@iki.fi>
Date: Fri, 28 Nov 2008 13:20:46 +0200
Subject: [PATCH] i82875p_edac: Fix overflow device resource setup

The resources of the hidden overflow device are missing after the device
is revealed and resources must be added separately.

Signed-off-by: Jarkko Lavinen <jlavi@iki.fi>
---
 drivers/edac/i82875p_edac.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
index e43bdc4..7f90997 100644
--- a/drivers/edac/i82875p_edac.c
+++ b/drivers/edac/i82875p_edac.c
@@ -295,6 +295,7 @@ static int i82875p_setup_overfl_dev(struct pci_dev *pdev,
 				"%s(): pci_bus_add_device() Failed\n",
 				__func__);
 		}
+		pci_bus_assign_resources(dev->bus);
 	}
 
 	*ovrfl_pdev = dev;
-- 
1.5.6.5


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
bluesmoke-devel mailing list
bluesmoke-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluesmoke-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic