diff options
| author | Michael Brown | 2005-04-13 05:00:30 +0200 |
|---|---|---|
| committer | Michael Brown | 2005-04-13 05:00:30 +0200 |
| commit | 677cda32637913cc9742f433beafdd0b75bb9e11 (patch) | |
| tree | 6df2bf431fc2823a3277f69dd58ac856714ca0c1 /src/drivers | |
| parent | Extracted from 3c509.c (diff) | |
| download | ipxe-677cda32637913cc9742f433beafdd0b75bb9e11.tar.gz ipxe-677cda32637913cc9742f433beafdd0b75bb9e11.tar.xz ipxe-677cda32637913cc9742f433beafdd0b75bb9e11.zip | |
Minor fixups
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/bus/pci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/bus/pci.c b/src/drivers/bus/pci.c index 0ae7c3bc8..1ec099e8f 100644 --- a/src/drivers/bus/pci.c +++ b/src/drivers/bus/pci.c @@ -119,6 +119,7 @@ struct pci_device * pci_device ( struct dev *dev ) { if ( dev->devid.bus_type != PCI_BUS_TYPE ) { memset ( pci, 0, sizeof ( *pci ) ); + dev->devid.bus_type = PCI_BUS_TYPE; } pci->dev = dev; return pci; @@ -153,8 +154,8 @@ int find_pci_device ( struct pci_device *pci, /* Fill in dev structure, if present */ if ( pci->dev ) { pci->dev->name = driver->name; - pci->dev->devid.vendor_id = pci->vendor; - pci->dev->devid.device_id = pci->dev_id; + pci->dev->devid.vendor_id = htons ( pci->vendor ); + pci->dev->devid.device_id = htons ( pci->dev_id ); } /* If driver has a class, and class matches, use it */ |
