PCI: latency timer doesn't apply to PCIe
authorMyron Stowe <mstowe@redhat.com>
Fri, 28 Oct 2011 21:49:20 +0000 (15:49 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 6 Jan 2012 20:10:47 +0000 (12:10 -0800)
The latency timer is read-only and hardwired to zero for all PCIe
devices, both Type 0 and Type 1, so don't bother trying to update it
and cluttering the dmesg log with meaningless "setting latency timer
to 64" messages.

Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pci.c

index f9abe84..5c5adef 100644 (file)
@@ -2613,6 +2613,10 @@ void __weak pcibios_set_master(struct pci_dev *dev)
 {
        u8 lat;
 
+       /* The latency timer doesn't apply to PCIe (either Type 0 or Type 1) */
+       if (pci_is_pcie(dev))
+               return;
+
        pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
        if (lat < 16)
                lat = (64 <= pcibios_max_latency) ? 64 : pcibios_max_latency;