* Fwd: Attaching drivers to identical PCI devices. [not found] <CAPykPMmLkQ2O5253EcUFuwNdmMKcL-Nr9KQi1EZoMH2yuHXcjQ@mail.gmail.com> @ 2014-02-28 18:54 ` Jeroen Van den Keybus 2014-02-28 19:03 ` Alex Williamson 0 siblings, 1 reply; 2+ messages in thread From: Jeroen Van den Keybus @ 2014-02-28 18:54 UTC (permalink / raw) To: linux-pci I would like to use 2 versions of a PCI driver, each for one of 2 identical devices. The driver that gets probed first will seize both devices in driver_attach(). Using sysfs's bind and unbind methods, you can arrange to release the device for use by the other driver, but the first driver has nevertheless been initializing, driving and shutting down the device, which is unacceptable in my case. What would be the best way to deal with this ? Thanks, J. ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Fwd: Attaching drivers to identical PCI devices. 2014-02-28 18:54 ` Fwd: Attaching drivers to identical PCI devices Jeroen Van den Keybus @ 2014-02-28 19:03 ` Alex Williamson 0 siblings, 0 replies; 2+ messages in thread From: Alex Williamson @ 2014-02-28 19:03 UTC (permalink / raw) To: Jeroen Van den Keybus; +Cc: linux-pci On Fri, 2014-02-28 at 19:54 +0100, Jeroen Van den Keybus wrote: > I would like to use 2 versions of a PCI driver, each for one of 2 > identical devices. The driver that gets probed first will seize both > devices in driver_attach(). > > Using sysfs's bind and unbind methods, you can arrange to release the > device for use by the other driver, but the first driver has > nevertheless been initializing, driving and shutting down the device, > which is unacceptable in my case. > > What would be the best way to deal with this ? It's not a very good solution, but you can use pci-stub to claim both devices, then manually unbind each from pci-stub and bind it to the driver you want. Compile pci-stub statically so it gets first dibs (CONFIG_PCI_STUB=y) and boot with pci-stub.ids=xxxx:yyyy where x/y is vendor/device ID. Use sysfs to unbind the device you want, load the driver, repeat for the second device & driver. Thanks, Alex ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-28 19:03 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <CAPykPMmLkQ2O5253EcUFuwNdmMKcL-Nr9KQi1EZoMH2yuHXcjQ@mail.gmail.com> 2014-02-28 18:54 ` Fwd: Attaching drivers to identical PCI devices Jeroen Van den Keybus 2014-02-28 19:03 ` Alex Williamson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).