Add a field for the class code to struct pci_driver.
Fill out some previously uninitialized fields as well. MFC after: 1 week
This commit is contained in:
parent
ecf29cf148
commit
6373e95eb6
@ -56,8 +56,9 @@
|
||||
struct pci_device_id {
|
||||
uint32_t vendor;
|
||||
uint32_t device;
|
||||
uint32_t subvendor;
|
||||
uint32_t subvendor;
|
||||
uint32_t subdevice;
|
||||
uint32_t class;
|
||||
uint32_t class_mask;
|
||||
uintptr_t driver_data;
|
||||
};
|
||||
@ -202,7 +203,8 @@ struct pci_dev {
|
||||
uint16_t vendor;
|
||||
unsigned int irq;
|
||||
unsigned int devfn;
|
||||
u8 revision;
|
||||
uint32_t class;
|
||||
uint8_t revision;
|
||||
};
|
||||
|
||||
static inline struct resource_list_entry *
|
||||
|
@ -129,8 +129,11 @@ linux_pci_attach(device_t dev)
|
||||
pdev->dev.parent = &linux_root_device;
|
||||
pdev->dev.bsddev = dev;
|
||||
INIT_LIST_HEAD(&pdev->dev.irqents);
|
||||
pdev->devfn = PCI_DEVFN(pci_get_slot(dev), pci_get_function(dev));
|
||||
pdev->device = id->device;
|
||||
pdev->vendor = id->vendor;
|
||||
pdev->class = pci_get_class(dev);
|
||||
pdev->revision = pci_get_revid(dev);
|
||||
pdev->dev.dma_mask = &pdev->dma_mask;
|
||||
pdev->pdrv = pdrv;
|
||||
kobject_init(&pdev->dev.kobj, &linux_dev_ktype);
|
||||
|
Loading…
x
Reference in New Issue
Block a user