how kernel detect device and make proble() called?

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

 



hong zhang wrote:
> List,
> 
> Example is PCI ethernet card. how kernel knows NIC is inserted to PCI bus and call .probe?


the answer is in the question:


> static struct pci_driver e1000_driver = {
> 	.name     = e1000_driver_name,
> 	.id_table = e1000_pci_tbl,

this entry contains a list of device IDs that this driver claims to support. IOW
when the PCI system probes the PCI bus and discovers all the PCI device IDs, it
knows that the driver described by 'e1000_driver' claims to support it.


There are great documents online on PCI bus discovery and the linux driver system,
please read those. They explain all of this.

Auke


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux