Hi, > <snip> > ... which finally calls the probe function (which can > reassign the address regions, if wants to), ... The address ranges once set by the firmware / kernel cannot be reassigned by the driver. The driver simply has to make use of the very same physical address range. It can merely ioremap() it to virtual address space. > I think IRQ configuration takes place here only. The IRQ to be used is decided by the firmware. As I said above, the driver merely takes note of it. > My question is, I looked at the probe.c whose functions > (scan slot and scan bus) are used by the hotplug > directory. I think what is happening here is, each of > the core files define enable slot function which > configures the device and use the functions in probe > file. Then there is top file, pci_hotplug_core which > calls this enable slot in power_write_file function. > Can anyone please explain what is happening here ? Greg might correct me here, but here is my opinion. The above stuff forms what is known as the hotplug driver (E.g. pciehp, acpiphp, etc). It controls the hot-plug controller, and is responsible for regitering the device with the BUS hirearchy (PCI device hierarchy here). But merely registering a device as a PCI device does not really start it working. You need to load the driver for that in order to make it functional. For e.g., a network card may be plugged to a PCI hotpluggable slot, and the hot plug driver registers it as a PCI device. But the network driver needs to be loaded in order to register it as a network device. And this is the task of /sbin/hotplug. Here is how it happens: 1) New device is hot-plugged (How? - hotplug controller / driver dependent) 2) The hot-plug driver registers it as PCI device. 3) The event goes to userspace /sbin/hotplug (via call_usermodehelper()) 4) /sbin/hotplug finds out from args / env vars about what kind of device it is. 5) It consults modules.pcimap file to decide which driver to load. 6) It loads that driver. 7) The driver makes the device operational. I hope I am able to recall that correctly. > and > if hot-plugging is there via /sbin/hotplug ? why this? I hope the above brings some clarity. Thanks, Rajat -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ