Re: Fwd: Attaching drivers to identical PCI devices.

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

 



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

--
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