Skip to contentSkip to conversation

broken tpm driver that register LPC device

DISCUSSION matthieu castet 1 participant 1 message Aug 6, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

I have seen that new tpm driver register lpc device with pci_register_driver, and does pci_disable_device on it.

This is _very_ broken as other driver share the same pci device.
For example drivers/char/watchdog/i8xx_tco.c. This one is right, as it only scan the lpc device via pci_find_device and don't register it. It also don't try to enable/disable it...

Finaly, after a quick look, they don't even need to acess the lpc as they don't read/write any value on it, they just do some IO on some ports.

Of course they don't care to request these IO ports with request_region...

I really wonder how such messy driver go into mainline kernel.

So for the tpm on the lpc, use pnp layer if possible or don't register it, and do like i8xx_tco.c. And before doing any IO use request_region...

regards,

Matthieu