From e9dfdd9dbdbe91cb5754671592ae3d1fc0916f3c Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Thu, 26 Apr 2012 16:04:18 -0600 Subject: Reverse Vendor ID & Device ID for map_oprom_vendev() - When calling map_oprom_vendev() the vendor ID and device ID are joined into a 32 bit value. They were reversed from the order that I would have expected - Device ID as the high 16 bits and the Vendor ID as the low 16. This patch reverses them so so that the the dword comparison in map_oprom_vendev() matches what's entered into Kconfig for vendor,device. - Change files calling map_oprom_vendev() Change-Id: I5b84db3cb1a359a7533409fde7d05fbc6ba3fcc4 Signed-off-by: Martin L Roth Reviewed-on: http://review.coreboot.org/938 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Ronald G. Minnich --- src/devices/pci_rom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/devices') diff --git a/src/devices/pci_rom.c b/src/devices/pci_rom.c index 800776e8df..e7933eba08 100644 --- a/src/devices/pci_rom.c +++ b/src/devices/pci_rom.c @@ -37,7 +37,7 @@ struct rom_header *pci_rom_probe(struct device *dev) /* If it's in FLASH, then don't check device for ROM. */ rom_header = cbfs_load_optionrom(dev->vendor, dev->device, NULL); - u32 vendev = dev->vendor | (dev->device << 16); + u32 vendev = (dev->vendor << 16) | dev->device; u32 mapped_vendev = vendev; if (map_oprom_vendev) @@ -45,8 +45,8 @@ struct rom_header *pci_rom_probe(struct device *dev) if (!rom_header) { if (vendev != mapped_vendev) { - rom_header = cbfs_load_optionrom(mapped_vendev & - 0xffff, mapped_vendev >> 16, NULL); + rom_header = cbfs_load_optionrom(mapped_vendev >> 16, + mapped_vendev & 0xffff , NULL); } } -- cgit v1.2.3