1) I can't understand relationship between, say, pci driver and network driver. If my ethernet controler is hosted on a pci bus is this device a struct net_device or a struct pci_dev ? If it is a pci_dev it's registered by the pci core before the core calls the probe callback of my driver. If it is a net_device my driver must call register_netdev for the device. What's the right way ? (if both device structures are needed when to load the module which holds net_device driver code with respect to the loading of the module which holds pci_dev driver code ?)
(I have focused on struct net_device as an example but the same question happens for other classes of devices whose controler can be hosted on a pci bus).
2) An other (unrelated) question is : why usb driver must register itself the devices it is bounded to ? (unlike pci driver). It would make sens to have the same registration scheme for devices on both buses.
Thanks for help.
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.