[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1243441505-5477-1-git-send-email-yu.zhao@intel.com>
Date: Thu, 28 May 2009 00:25:05 +0800
From: Yu Zhao <yu.zhao@...el.com>
To: jbarnes@...tuousgeek.org
Cc: linux-pci@...r.kernel.org, marc.c.dionne@...il.com,
linux-kernel@...r.kernel.org, Yu Zhao <yu.zhao@...el.com>
Subject: [PATCH] PCI: use fixed-up device class when configuring device
The device class may be changed after the early fixup. Need to
re-read the class value from pci_dev when configuring the device.
Otherwise some devices such as JMicron SATA controller won't work.
Tested-by: Marc Dionne <marc.c.dionne@...il.com>
Signed-off-by: Yu Zhao <yu.zhao@...el.com>
---
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 */
--
1.6.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists