Hi, [ I'm not an expert on PCI questions, so please Greg or others correct if I'm wrong ] Le Thu, 4 May 2006 11:02:13 +0530, "Md.Zaheeruddin Khan" <zaheer031@xxxxxxxxx> a écrit : > Suppose I have three ethernet cards with the same mac address how > many times the init module and the probe will be called . The init_module() function is called only once for a given module. According to page 11 of http://lwn.net/images/pdf/LDD3/ch12.pdf : « int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); Pointer to the probe function in the PCI driver. This function is called by the PCI core when it has a struct pci_dev that it thinks this driver wants to control. A pointer to the struct pci_device_id that the PCI core used to make this decision is also passed to this function. If the PCI driver claims the struct pci_dev that is passed to it, it should initialize the device properly and return 0. If the driver does not want to claim the device, or an error occurs, it should return a negative error value. More details about this function follow later in this chapter. » So, as I understand it, your probe() function will be called for each device. I suggest you to read the rest of the 12th chapter of Linux Device Drivers for more information. Sincerly, Thomas -- PETAZZONI Thomas - thomas.petazzoni@xxxxxxxx http://{thomas,sos,kos}.enix.org - Jabber: thomas.petazzoni@xxxxxxxxx http://{agenda,livret}dulibre.org - http://www.toulibre.org Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E 1624 F653 CB30 98D3 F7A7
Attachment:
signature.asc
Description: PGP signature