Linux核心数据结构--pci_dev

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

[i]/*

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

* combination:

*/[/i]

[b]struct pci_dev {

struct pci_bus *bus;[/b] [i] /* bus this device is on */[/i]

[b]struct pci_dev *sibling;[/b] [i]/* next device on this bus */[/i]
[b] struct pci_dev *next; [/b] [i]/* chain of all devices */[/i]


[b]void *sysdata;[/b] [i]/* hook for sys-specific extension */[/i]


[b]unsigned int devfn;[/b] [i]/* encoded device & function index */[/i]

[b] unsigned short vendor;

unsigned short device;

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

[i] /*

* 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.

*/[/i]

[b]unsigned char irq;[/b] [i]/* irq generated by this device */[/i]
[b]
};[/b]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值