[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ethernet card
On Thu, May 04, 2006 at 07:51:39PM +0200, Thomas Petazzoni wrote:
> 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.
No correction needed, this is exactly what will happen.
thanks,
greg k-h
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/