From: Yu Zhao Date: Wed, 27 May 2009 16:25:05 +0000 (+0800) Subject: PCI: use fixed-up device class when configuring device X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f79b1b146b52765ee38bfb91bb14eb850fa98017;p=linux-beck.git 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 Reviewed-by: Grant Grundler Tested-by: Marc Dionne Signed-off-by: Yu Zhao Signed-off-by: Jesse Barnes --- diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index e3c3e081b834..f1ae2475ffff 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -745,6 +745,8 @@ int pci_setup_device(struct pci_dev *dev) /* Early fixups, before probing the BARs */ pci_fixup_device(pci_fixup_early, dev); + /* device class may be changed after fixup */ + class = dev->class >> 8; switch (dev->hdr_type) { /* header type */ case PCI_HEADER_TYPE_NORMAL: /* standard header */