]> Git Repo - J-linux.git/commitdiff
PCI: use fixed-up device class when configuring device
authorYu Zhao <[email protected]>
Wed, 27 May 2009 16:25:05 +0000 (00:25 +0800)
committerJesse Barnes <[email protected]>
Thu, 4 Jun 2009 10:29:43 +0000 (11:29 +0100)
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 <[email protected]>
Reviewed-by: Grant Grundler <[email protected]>
Tested-by: Marc Dionne <[email protected]>
Signed-off-by: Yu Zhao <[email protected]>
Signed-off-by: Jesse Barnes <[email protected]>
drivers/pci/probe.c

index e3c3e081b83431755b7c3e875c84e5e7bc30f684..f1ae2475ffffcd827844694c0075448d62cfb3e1 100644 (file)
@@ -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 */
This page took 0.048679 seconds and 4 git commands to generate.