Re: Hot PCI bus plugging

ak@ebox.de
Wed, 24 Nov 1999 17:53:13 +0100


* Bret Indrelee (bindrelee@sbs-cp.com) [991124 16:39]:
> ak@ebox.de wrote:
> [ snip ]
> > The thoughts I have are, that at the beginning only a modified kernel
> > is needed, that would allow to retrigger the PCI scanning at any
> > time. Nothing automatic is done further, the current PCI configuration
> > is just recorded.
> >
> > Then it should be possible to insmod standard drivers. They won't see
> > any difference between a card that was active at system start, and a
> > card that was later inserted and added to the system by a rescan of
> > the bus.
>
> This doesn't handle the common case of adding another card of the same type
> as already exist in the system. In that case if you don't want to redesign
> the driver interface you have to remove the driver, reconfigure, and then
> install the driver again.

And if you cannot rmmod that driver you cannot use the additional card
at all.

For example that would be the case with the ide controller in my
laptop, where the docking station ads another channel. That ide device
would be useless, until the driver itself gets redesigned for hot
plugging, or I boot from scsi (don't know how to do that, though, but
I am not interested in that ether).

> > If you want to unplug the card you would have to remove the module
> > manually before unplugging, to prevent that the driver crashes badly.
> >
> > A PCI bus rescan would then remove that PCI card from the kernel list,
> > preventing accidently loading a driver for a not more existing
> > card. It's not strictly necessary therefore, if you know, what you are
> > doing, I think.
>
> You most definately would have to remove it from the device list. The device
> list is what the drivers are supposed to use to detect any instances of
> their device installed in the system. You don't want a device detecting it
> exists when it has been removed from the system.

Ok. What I meant was: We are safe, until we try some insmod. And you
are right: It's not very clean, not to remove it from the list.

Alex

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/