Messages in this thread | | | Date | Wed, 24 Nov 1999 14:33:00 +0100 | From | ak@ebox ... | Subject | Re: Hot PCI bus plugging |
| |
Hi!
Reading this thread with much interest I just have to think how much effort it is a least to get a minimal hot swapping support up and running.
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.
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.
Is this all, that is needed to get it work? It wouldn't be very user friendly of course, but a experienced user surely could handle this and therefore could help in the developing process by adding information.
If this concept fits, the big question is: How much effort is it to add the rescanning to the PCI code of the kernel.
Thinking about lots of badly designed hardware, I wouldn't wonder that just detecting properly the installed PCI cards in a rescan could give lots of headaches.
Lets quote * Eric Lowe (elowe@myrile.madriver.k12.oh.us) [991122 17:50]: > In the current implementation, it (pci.c) scans for all devices at boot time. > I don't think it would be a big deal to modify the kernel to support hot-plug > devices, though there should probably be a notification mechanism set up so > that drivers are notified cleanly when the device has been (or is about to > be) removed.
Maybe it isn't as hard as I think?
Btw: I guess some user level programs will happily crash, when the contents of /proc/pci change, but that is another topic.
* Eric Lowe > I may work on this if there is enough demand for it.
Do you need assistance, hint, hint?
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/
| |