Solved PCI Driver vendorID/deviceID defined where?

Hi all,

I am reading the FreeBSD Architecture Handbook, PCI Devices. In the sample source provided, I do not see where the VendorID or DeviceID are defined. My test VirtualBox instance seems probe and attach to 0x80EE (Likely because its Oracle Virtualbox) with the alternating device IDs of 0xcafe/0x7113.

I looked at some sample code but failed to see how lines 118-127 were used by the device driver.

Pardon my ignorance, I am relatively new to this amazing system.
 
I see how it includes the header files, but I do not see where the vendorID and deviceID are utilized within them.
 
In the linked if_ath driver, the vendors are specified in lines 118-127 as you mention.
Just under this, if_ath_pci_devlist.h is included, which contains a table listing all the devices (vendor id & device id) that the driver supports. I don't know why the vendors are in the main .c file, then the table is in the .h file...

The ath_pci_attach function calls ath_pci_probe_device, which runs through the table of supported devices. I'm no kernel hacker so I don't know why this is done in the attach function when the sample code from the handbook does it in probe.
 
The code makes perfect sense, I was misreading it. The sample code just checking if a winmodem (0x11c1) was present. It was merely displaying what vendor/device IDs it was surveying. Nothing more.
 
Back
Top