This is a note to let you know that I've just added the patch titled
PCI: Allow PCIe Capability link-related register access for switches
to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
pci-allow-pcie-capability-link-related-register-access-for-switches.patch
and it can be found in the queue-3.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From d3694d4fa3f44f6a295f8ab064937c8a1549d174 Mon Sep 17 00:00:00 2001
From: Bjorn Helgaas <[email protected]>
Date: Tue, 27 Aug 2013 09:54:40 -0600
Subject: PCI: Allow PCIe Capability link-related register access for switches
From: Bjorn Helgaas <[email protected]>
commit d3694d4fa3f44f6a295f8ab064937c8a1549d174 upstream.
Every PCIe device has a link, except Root Complex Integrated Endpoints
and Root Complex Event Collectors. Previously we didn't give access
to PCIe capability link-related registers for Upstream Ports, Downstream
Ports, and Bridges, so attempts to read PCI_EXP_LNKCTL incorrectly
returned zero. See PCIe spec r3.0, sec 7.8 and 1.3.2.3.
Reference:
http://lkml.kernel.org/r/979a8436335e3744adcd3a9f2a2b68a52ad13...@sjexchmb10.corp.ad.broadcom.com
Reported-by: Yuval Mintz <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-By: Jiang Liu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/pci/access.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -485,9 +485,13 @@ static inline bool pcie_cap_has_lnkctl(c
int type = pci_pcie_type(dev);
return pcie_cap_version(dev) > 1 ||
- type == PCI_EXP_TYPE_ROOT_PORT ||
type == PCI_EXP_TYPE_ENDPOINT ||
- type == PCI_EXP_TYPE_LEG_END;
+ type == PCI_EXP_TYPE_LEG_END ||
+ type == PCI_EXP_TYPE_ROOT_PORT ||
+ type == PCI_EXP_TYPE_UPSTREAM ||
+ type == PCI_EXP_TYPE_DOWNSTREAM ||
+ type == PCI_EXP_TYPE_PCI_BRIDGE ||
+ type == PCI_EXP_TYPE_PCIE_BRIDGE;
}
static inline bool pcie_cap_has_sltctl(const struct pci_dev *dev)
Patches currently in stable-queue which might be from [email protected] are
queue-3.10/pci-support-pcie-capability-slot-registers-only-for-ports-with-slots.patch
queue-3.10/pci-remove-pcie-capability-version-checks.patch
queue-3.10/pci-allow-pcie-capability-link-related-register-access-for-switches.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html