Gitweb: http://git.kernel.org/linus/f79b1b146b52765ee38bfb91bb14eb850fa98017 Commit: f79b1b146b52765ee38bfb91bb14eb850fa98017 Parent: 9fa7eb283c5cdc2b0f4a8cfe6387ed82e5e9a3d3 Author: Yu Zhao <yu.zhao@intel.com> AuthorDate: Thu May 28 00:25:05 2009 +0800 Committer: Jesse Barnes <jbarnes@virtuousgeek.org> CommitDate: Thu Jun 4 11:29:43 2009 +0100 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> --- drivers/pci/probe.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index e3c3e08..f1ae247 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 */ -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
