lkml.org 
[lkml]   [2014]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PCI, EDAC: fix ordering assign resource and bus_add
On Fri, May 30, 2014 at 11:01:03AM -0600, Bjorn Helgaas wrote:
> On Tue, May 07, 2013 at 04:29:31PM -0700, Yinghai Lu wrote:
> > We should assign unassigned resource before pci_bus_add_device.
> >
> > as late one will enable driver and create sysfs file that will need
> > pci io resources from assign unassigned code.
> >
> > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>
> Applied to pci/resource for v3.16, thanks!

This is touching drivers/edac/ and I guess I'm fine with it,

Acked-by: Borislav Petkov <bp@suse.de>

> > ---
> > drivers/edac/i82875p_edac.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > Index: linux-2.6/drivers/edac/i82875p_edac.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/edac/i82875p_edac.c
> > +++ linux-2.6/drivers/edac/i82875p_edac.c
> > @@ -293,13 +293,14 @@ static int i82875p_setup_overfl_dev(stru
> > if (dev == NULL)
> > return 1;
> >
> > + pci_bus_assign_resources(dev->bus);
> > +
> > err = pci_bus_add_device(dev);
> > if (err) {
> > i82875p_printk(KERN_ERR,
> > "%s(): pci_bus_add_device() Failed\n",
> > __func__);
> > }
> > - pci_bus_assign_resources(dev->bus);a


... one question though: how are people using those pci_bus*
functions supposed to know that pci_bus_assign_resources needs to
go before pci_bus_add_device? The comment in pci_bus_add_device()
mentions something about it but wouldn't it be possible to call
pci_bus_assign_resources() in pci_bus_add_device() when resources are
not assigned?

Sorry if my question is completely dumb - I have no presumption of
knowing pci and haven't looked either. Just asking with my user hat on.

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2014-05-31 00:21    [W:0.048 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site