libpci uses PCIOCGETCONF for non-privileged access to /dev/pci
and calculates device_class value based on pc_class/pc_subclass
fields expecting the former to be higher 8 bits of the target value.
0f3d0ca73ecedaba180bf4607bb57fb8abe6d405 errorneously swapped
order of class/subclass during calculations.
Signed-off-by: Oleksandr Tymoshenko <gonzo@bluezbox.com>
}
if (flags & PCI_FILL_CLASS)
{
- d->device_class = match.pc_class | (match.pc_subclass << 8);
+ d->device_class = (match.pc_class << 8) | match.pc_subclass;
}
if (flags & (PCI_FILL_BASES | PCI_FILL_SIZES))
{