Quick Reference
This section, as usual, summarizes the symbols introduced in the chapter.
-
#include <linux/config.h>,CONFIG_PCI This macro should be used to conditionally compile PCI-related code. When a PCI module is loaded to a non-PCI kernel, insmod complains about several symbols being unresolved.
-
#include <linux/pci.h> This header includes symbolic names for the PCI registers and several vendor and deviceID values.
-
#include <linux/bios32.h> All the
pcibios_functions listed below are prototyped in this header.-
int pcibios_present(void); This function returns a boolean value that tell whether the computer we’re running on has PCI capabilities or not.
-
int pcibios_find_device (unsigned short vendor,,unsigned short id,,unsigned short index,,unsigned char *bus,,unsigned char *function);,int pcibios_find_class (unsigned int class_code,,unsigned short index,,unsigned char *bus,,unsigned char *function); These functions are used to query the PCI firmware about the availability of devices featuring a particular signature or belonging to a particular class. The return value is an error indication, and in case of success,
busandfunctionare used to store the position of the device.indexmust be passed as 0 the first time and incremented each time a new device is looked for.-
PCIBIOS_SUCCESSFUL ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access