Re: [PATCH] ppc/EEH: fix crash when adding a device in a slot with DDW

2012-12-28 Thread Thadeu Lima de Souza Cascardo
On Fri, Dec 28, 2012 at 01:18:24PM +0800, Gavin Shan wrote: > On Thu, Dec 27, 2012 at 02:34:00PM -0200, Thadeu Lima de Souza Cascardo wrote: > >The DDW code uses a eeh_dev struct from the pci_dev. However, this is > >not set until eeh_add_device_late is called. > > > >Since pci_bus_add_devices is c

Re: [PATCH] ppc/EEH: fix crash when adding a device in a slot with DDW

2012-12-27 Thread Gavin Shan
On Thu, Dec 27, 2012 at 02:34:00PM -0200, Thadeu Lima de Souza Cascardo wrote: >The DDW code uses a eeh_dev struct from the pci_dev. However, this is >not set until eeh_add_device_late is called. > >Since pci_bus_add_devices is called before eeh_add_device_late, the PCI >devices are added to the bu

[PATCH] ppc/EEH: fix crash when adding a device in a slot with DDW

2012-12-27 Thread Thadeu Lima de Souza Cascardo
The DDW code uses a eeh_dev struct from the pci_dev. However, this is not set until eeh_add_device_late is called. Since pci_bus_add_devices is called before eeh_add_device_late, the PCI devices are added to the bus, making drivers' probe hooks to be called. These will call set_dma_mask, which wil