Selectively disable a PCI-E Device?

Hey all,


1. Is it possible to disable/unload a kext for a specific PCI-E device?

2. If yes, how does one do this?


More specifically, if i have 2 or more, PCI-E of the same devices installed in my machine, both using the same KEXT driver,

Is it possible to disable just 1 of the devices?


Obviously unloading the kext will unload it form the kernel and both devices will stop working, but i would like to be able to load and unload for each device one at a time?


Cheers,

Replies

Are these your devices under development? If so, you could set the deviceID in the config registers to a different value temporarily and have a second copy of the kext that matches only that deviceID.


--gc

Heya,


Hmmmm,

I suppose that would be possible during development, ( of which i have almost finished now anyway)

However my goal is produce a tool that users/customers could use when they have systems with multiple cards.

Also i'm not big on the idea of duplicating an entire kext, just so that i can disable 1 of 2 or 3 when i need to.


But given the lack of responses on here I'm starting to think it's just not possible? 😟


Thanks for the reposnse anyway

Well, you can always quiesce the driver in preparation for hot-swap or whatever, so that the driver isn't doing anything—send stop commands to the device, stop monitoring interrupts, don't send any more commands to the device, etc. What's the purpose of disabling one of the cards—that is to say, what are you trying to achieve by doing so?