|
发表于 2006-9-19 23:12:04
|
显示全部楼层
我的pci_dev的数据结构
struct pci_dev {
struct pci_dev *next; /* Next device in the chain */
u16 domain; /* PCI domain (host bridge) */
u8 bus, dev, func; /* Bus inside domain, device and function */
/* These fields are set by pci_fill_info() */
int known_fields; /* Set of info fields already known */
u16 vendor_id, device_id; /* Identity of the device */
int irq; /* IRQ number */
pciaddr_t base_addr[6]; /* Base addresses */
pciaddr_t size[6]; /* Region sizes */
pciaddr_t rom_base_addr; /* Expansion ROM base address */
pciaddr_t rom_size; /* Expansion ROM size */
/* Fields used internally: */
struct pci_access *access;
struct pci_methods *methods;
u8 *cache; /* Cached config registers */
int cache_len;
int hdrtype; /* Cached low 7 bits of header type, -1 if unknown */
void *aux; /* Auxillary data */
};
你的 p->device_class
应该相当于我这里的
p->vendor_id, p->device_id (都是u16的数据类型)
的某种组合
但我不知道你那里device_class的长度和数据类型。 |
|