Linux device drivers 3 book feedback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux