diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2008-07-09 22:43:23 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2008-07-09 22:43:23 -0400 |
commit | 71c577685e08fa7bb66028887c0e8bb2ecf76f5b (patch) | |
tree | d908f24c8371fef3939ad80f213708994f26420d /src/pci.c | |
parent | a68aeaf68c152a602e048256811f5b10e8d02d6e (diff) | |
download | seabios-hppa-71c577685e08fa7bb66028887c0e8bb2ecf76f5b.zip seabios-hppa-71c577685e08fa7bb66028887c0e8bb2ecf76f5b.tar.gz seabios-hppa-71c577685e08fa7bb66028887c0e8bb2ecf76f5b.tar.bz2 |
Fix error in pci_find_class().
Fix biterror - must shift value read from pci space - otherwise stray
bits may be set and cause comparison to fail.
Diffstat (limited to 'src/pci.c')
-rw-r--r-- | src/pci.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -80,12 +80,11 @@ int pci_find_class(u32 classid, int index, PCIDevice *dev) { int devfn, bus; - u32 id = classid << 8; for (bus=0; bus < MAX_BUS; bus++) { for (devfn=0; devfn<0x100; devfn++) { PCIDevice d = pci_bd(bus, devfn); u32 v = pci_config_readl(d, 0x08); - if (v != id) + if ((v>>8) != classid) continue; if (index) { index--; |