Commit f79b1b146b52765ee38bfb91bb14eb850fa98017
Committed by
Jesse Barnes
1 parent
9fa7eb283c
Exists in
master
and in
20 other branches
PCI: use fixed-up device class when configuring device
The device class may be changed after the fixup, so re-read the class value from pci_dev when configuring the device. Otherwise some devices such as JMicron SATA controller won't work. Reviewed-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Grant Grundler <grundler@parisc-linux.org> Tested-by: Marc Dionne <marc.c.dionne@gmail.com> Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff
drivers/pci/probe.c
... | ... | @@ -745,6 +745,8 @@ |
745 | 745 | |
746 | 746 | /* Early fixups, before probing the BARs */ |
747 | 747 | pci_fixup_device(pci_fixup_early, dev); |
748 | + /* device class may be changed after fixup */ | |
749 | + class = dev->class >> 8; | |
748 | 750 | |
749 | 751 | switch (dev->hdr_type) { /* header type */ |
750 | 752 | case PCI_HEADER_TYPE_NORMAL: /* standard header */ |