Linux核心数据结构--pci_dev

表示系统中的每个PCI设备,包括PCI-PCI和PCI-PCI桥接器。

/*

* There is one pci_dev structure for each slot-number/function-number

* combination:

*/


struct pci_dev {

  struct pci_bus  *bus;
     /* bus this device is on */

  struct pci_dev  *sibling;  /* next device on this bus */
struct pci_dev  *next;     /* chain of all devices */


  void    *sysdata;          /* hook for sys-specific extension */


  unsigned int  devfn;       /* encoded device & function index */

unsigned short  vendor;

  unsigned short  device;

  unsigned int  class;   
   /* 3 bytes: (base,sub,prog-if) */
  unsigned int  master : 1;  /* set if device is master capable */

/*

   * In theory, the irq level can be read from configuration

   * space and all would be fine.  However, old PCI chips don't

   * support these registers and return 0 instead.  For example,

   * the Vision864-P rev 0 chip can uses INTA, but returns 0 in

   * the interrupt line and pin registers.  pci_init()

   * initializes this field with the value at PCI_INTERRUPT_LINE

   * and it is the job of pcibios_fixup() to change it if

   * necessary.  The field must not be 0 unless the device

   * cannot generate interrupts at all.

   */


  unsigned char  irq;        /* irq generated by this device */

};


你可能感兴趣的:(数据结构,linux)