Re: [patch 2/5] fakephp: allocate PCI resources before adding the device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>:
> On Friday, January 9, 2009 12:26 pm akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> > From: "Darrick J. Wong" <djwong@xxxxxxxxxx>
> >
> > For PCI devices, pci_bus_assign_resources() must be called to set up the
> > pci_device->resource array before pci_bus_add_devices() can be called,
> > else attempts to load drivers results in BAR collision errors where there
> > are none.  This is not done in fakephp, so devices can be "unplugged" but
> > scanning the parent bus won't bring the devices back due to resource
> > unallocation.
> >
> > Move the pci_bus_add_device-calling logic into pci_rescan_bus and preface
> > it with a call to pci_bus_assign_resources so that we only have to
> > (re)allocate resources once per bus where a new device is found.
> >
> > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> > Cc: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
> > Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> 
> I don't think we reached a consensus on this one; Alex is the de-facto owner 
> of this code.
> 
> I'd like to fix this regression if possible; Alex?

Acked-by: Alex Chiang <achiang@xxxxxx>

Sorry for the delay. I've been working on incorporating Trent's
previous patches into a complete fix for all of my screw-ups.

Thanks.

/ac

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux