[RFC] powerpc: set_dma_ops for pci hotplug

Hiroo Matsumoto matsumoto.hiroo at jp.fujitsu.com
Thu Apr 12 16:04:51 EST 2012


Hi


I'm trying to use PCI Express Hot Plug on powerpc platform.
But PCI driver returns error when hotplug.
Error log is as below.
http://www.spinics.net/lists/linux-pci/msg14534.html

Some of PCI driver needs dma_ops.
On x86 platform, dma_ops is getting from external variable.
On powerpc platform, dma_ops is getting from archdata.dma_ops in struct
device.
There is a problem that archdata.dma_ops is set only when boot with
pcibios_setup_bus_devices but not set when hotplug.
So when hotplug, PCI driver's probe will return error.

I add code of checking and setting dma_ops in pcibios_enable_device.
It is called from pci_enable_device_xxx in PCI driver's probe before
checking dma_ops.
And PCI driver works good when hotplug.


Regards.

Hiroo MATSUMOTO
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ppc-set_dma_ops-for-pcihp.patch
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20120412/61469230/attachment.ksh>


More information about the Linuxppc-dev mailing list