Re: Is there a user space pci rescan method?

From: Rolf Eike Beer
Date: Fri Sep 24 2004 - 07:26:20 EST


Am Freitag, 24. September 2004 14:16 schrieben Sie:
> Rolf Eike Beer wrote:
> > Normally you will just remove and bring back one or two cards in the
> > system (e.g. your NIC or sound card, depending on xmms or irc being on
> > top of your priority list *g*). So from my point of view it's a good idea
> > to keep the slot dirs on remove so you can just go back in your command
> > history and replace 0 with 1 to get the device back. I don't see why bus
> > structure or whatever may ever change so rescanning the whole bus is IMHO
> > a bit overkill.
>
> My point was, I load dummyphp with showunused=0 and only get dirs for the
> slots with devices in them. Now I decide to put a network card (or whatever
> I have to spare) in an empty slot, hope that the system doesn't reboot
> immediately, and voila I don't have any /sys/bus/pci/slots dir to enable
> the slot and have to reboot nevertheless. Or does the pci system a rescan
> if I reinsert the module?

In this case you have to "rmmod dummyphp; modprobe dummyphp showunused=1" to
get all slots and try to enable the device. We have tested it once with a
special PCI debugging board where we can electrically disable the PCI bus so
we don't kill our hardware. The problem was that on reenabling a interrupt
storm killed the machine, I don't remember the exact problem. IIRC it looked
like the kernel found the device but the PCI bridge got confused by the new
device (or something like this). I don't know if there is a way to survive
this situation as the bridges in "normal" hardware are not hotplug aware.
Greg?

If there is a way I will try to impleement it, but for now this is beyound my
knowledge.

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