x86, mtrr: Use pci_dev->revision
This code uses PCI_CLASS_REVISION instead of PCI_REVISION_ID, so
it wasn't converted by commit 44c10138fd
("PCI: Change all
drivers to use pci_device->revision") before being moved to
arch/x86/...
Do it now at last -- and save one level of indentation...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Link: http://lkml.kernel.org/r/201107012242.08347.sshtylyov@ru.mvista.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
192d885742
commit
50c31e4a24
@@ -79,7 +79,6 @@ void set_mtrr_ops(const struct mtrr_ops *ops)
|
|||||||
static int have_wrcomb(void)
|
static int have_wrcomb(void)
|
||||||
{
|
{
|
||||||
struct pci_dev *dev;
|
struct pci_dev *dev;
|
||||||
u8 rev;
|
|
||||||
|
|
||||||
dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, NULL);
|
dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, NULL);
|
||||||
if (dev != NULL) {
|
if (dev != NULL) {
|
||||||
@@ -89,13 +88,11 @@ static int have_wrcomb(void)
|
|||||||
* chipsets to be tagged
|
* chipsets to be tagged
|
||||||
*/
|
*/
|
||||||
if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS &&
|
if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS &&
|
||||||
dev->device == PCI_DEVICE_ID_SERVERWORKS_LE) {
|
dev->device == PCI_DEVICE_ID_SERVERWORKS_LE &&
|
||||||
pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev);
|
dev->revision <= 5) {
|
||||||
if (rev <= 5) {
|
pr_info("mtrr: Serverworks LE rev < 6 detected. Write-combining disabled.\n");
|
||||||
pr_info("mtrr: Serverworks LE rev < 6 detected. Write-combining disabled.\n");
|
pci_dev_put(dev);
|
||||||
pci_dev_put(dev);
|
return 0;
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Intel 450NX errata # 23. Non ascending cacheline evictions to
|
* Intel 450NX errata # 23. Non ascending cacheline evictions to
|
||||||
|
Reference in New Issue
Block a user