Add subsystem vendor and device ID fields to struct pci_dev.
MFC after: 1 week
This commit is contained in:
parent
c31654c5b6
commit
f2ec04a394
@ -202,6 +202,8 @@ struct pci_dev {
|
||||
uint64_t dma_mask;
|
||||
uint16_t device;
|
||||
uint16_t vendor;
|
||||
uint16_t subsystem_vendor;
|
||||
uint16_t subsystem_device;
|
||||
unsigned int irq;
|
||||
unsigned int devfn;
|
||||
uint32_t class;
|
||||
|
@ -119,10 +119,13 @@ linux_pci_attach(device_t dev)
|
||||
{
|
||||
struct resource_list_entry *rle;
|
||||
struct pci_dev *pdev;
|
||||
struct pci_devinfo *dinfo;
|
||||
struct pci_driver *pdrv;
|
||||
const struct pci_device_id *id;
|
||||
int error;
|
||||
|
||||
dinfo = device_get_ivars(dev);
|
||||
|
||||
linux_set_current(curthread);
|
||||
pdrv = linux_pci_find(dev, &id);
|
||||
pdev = device_get_softc(dev);
|
||||
@ -132,6 +135,8 @@ linux_pci_attach(device_t dev)
|
||||
pdev->devfn = PCI_DEVFN(pci_get_slot(dev), pci_get_function(dev));
|
||||
pdev->device = id->device;
|
||||
pdev->vendor = id->vendor;
|
||||
pdev->subsystem_vendor = dinfo->cfg.subvendor;
|
||||
pdev->subsystem_device = dinfo->cfg.subdevice;
|
||||
pdev->class = pci_get_class(dev);
|
||||
pdev->revision = pci_get_revid(dev);
|
||||
pdev->dev.dma_mask = &pdev->dma_mask;
|
||||
|
Loading…
x
Reference in New Issue
Block a user