This is a note to let you know that I've just added the patch titled

    PCI: Support PCIe Capability Slot registers only for ports with slots

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-support-pcie-capability-slot-registers-only-for-ports-with-slots.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 6d3a1741f1e648cfbd5a0cc94477a0d5004c6f5e Mon Sep 17 00:00:00 2001
From: Bjorn Helgaas <[email protected]>
Date: Wed, 28 Aug 2013 12:01:03 -0600
Subject: PCI: Support PCIe Capability Slot registers only for ports with slots

From: Bjorn Helgaas <[email protected]>

commit 6d3a1741f1e648cfbd5a0cc94477a0d5004c6f5e upstream.

Previously we allowed callers to access Slot Capabilities, Status, and
Control for Root Ports even if the Root Port did not implement a slot.
This seems dubious because the spec only requires these registers if a
slot is implemented.

It's true that even Root Ports without slots must have *space* for these
slot registers, because the Root Capabilities, Status, and Control
registers are after the slot registers in the capability.  However,
for a v1 PCIe Capability, the *semantics* of the slot registers are
undefined unless a slot is implemented.

Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-By: Jiang Liu <[email protected]>
Acked-by: Myron Stowe <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/pci/access.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -497,9 +497,9 @@ static inline bool pcie_cap_has_sltctl(c
 {
        int type = pci_pcie_type(dev);
 
-       return type == PCI_EXP_TYPE_ROOT_PORT ||
-              (type == PCI_EXP_TYPE_DOWNSTREAM &&
-               pcie_caps_reg(dev) & PCI_EXP_FLAGS_SLOT);
+       return (type == PCI_EXP_TYPE_ROOT_PORT ||
+               type == PCI_EXP_TYPE_DOWNSTREAM) &&
+              pcie_caps_reg(dev) & PCI_EXP_FLAGS_SLOT;
 }
 
 static inline bool pcie_cap_has_rtctl(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

Reply via email to