PCI: Correct PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 value
PATCH 1/1 PCI: Correct PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 value
fb82437fdd8c ("PCI: Change capability register offsets to hex") incorrectly converted the PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 value from decimal 52 to hex 0x32:
-#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 52 /* v2 endpoints with link end here */
+#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32 /* end of v2 EPs w/ link */
Change PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 to the correct value of 0x34.
fb82437fdd8c was from Baruch Siach <[email protected]>, but this was not Baruch's fault; it's a mistake I made when applying the patch.
--- include/uapi/linux/pci_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/pci_regs.h +1 -1
@@ -712,7 +712,7 @@#define PCI_EXP_LNKCTL2_HASD 0x0020/* HW Autonomous Speed Disable */ #define PCI_EXP_LNKSTA2 0x32/* Link Status 2 */ #define PCI_EXP_LNKSTA2_FLIT 0x0400/* Flit Mode Status */ -#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32/* end of v2 EPs w/ link */ +#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x34/* end of v2 EPs w/ link */ #define PCI_EXP_SLTCAP2 0x34/* Slot Capabilities 2 */ #define PCI_EXP_SLTCAP2_IBPD 0x00000001/* In-band PD Disable Supported */ #define PCI_EXP_SLTCTL2 0x38/* Slot Control 2 */
Signature · 1 line
2.51.0
Hello,
[...]
include/uapi/linux/pci_regs.h line 718
Quoted 13 lines
include/uapi/linux/pci_regs.h +1
-1@@ -712,7 +712,7 @@#define PCI_EXP_LNKCTL2_HASD 0x0020/* HW Autonomous Speed Disable */ #define PCI_EXP_LNKSTA2 0x32/* Link Status 2 */ #define PCI_EXP_LNKSTA2_FLIT 0x0400/* Flit Mode Status */ -#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32/* end of v2 EPs w/ link */ +#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x34/* end of v2 EPs w/ link */ #define PCI_EXP_SLTCAP2 0x34/* Slot Capabilities 2 */ #define PCI_EXP_SLTCAP2_IBPD 0x00000001/* In-band PD Disable Supported */ #define PCI_EXP_SLTCTL2 0x38/* Slot Control 2 */
Looks good!
Thank you!
Krzysztof
Bjorn Helgaas
AppliedQuoted 9 lines · Bjorn Helgaas
fb82437fdd8c("PCI: Change capability register offsets to hex") incorrectly converted thePCI_CAP_EXP_ENDPOINT_SIZEOF_V2value from decimal 52 to hex0x32:-#define
PCI_CAP_EXP_ENDPOINT_SIZEOF_V252 /* v2 endpoints with link end here */
+#definePCI_CAP_EXP_ENDPOINT_SIZEOF_V20x32/* end of v2 EPs w/ link */Change
PCI_CAP_EXP_ENDPOINT_SIZEOF_V2to the correct value of0x34.
Quoted 7 lines
fb82437fdd8cwas from Baruch Siach <[email protected]>, but this was not Baruch's fault; it's a mistake I made when applying the patch.Fixes fb82437fdd8c ("PCI: Change capability register offsets to hex")Reported-by David Woodhouse <[email protected]>Signed-off-by Bjorn Helgaas <[email protected]>
I applied this to pci/for-linus for v7.0.
Per David, it fixes a VMM issue with PCI capabilities.
Quoted 20 lines
--- include/uapi/linux/pci_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/linux/pci_regs.h +1
-1@@ -712,7 +712,7 @@#define PCI_EXP_LNKCTL2_HASD 0x0020/* HW Autonomous Speed Disable */ #define PCI_EXP_LNKSTA2 0x32/* Link Status 2 */ #define PCI_EXP_LNKSTA2_FLIT 0x0400/* Flit Mode Status */ -#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32/* end of v2 EPs w/ link */ +#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x34/* end of v2 EPs w/ link */ #define PCI_EXP_SLTCAP2 0x34/* Slot Capabilities 2 */ #define PCI_EXP_SLTCAP2_IBPD 0x00000001/* In-band PD Disable Supported */ #define PCI_EXP_SLTCTL2 0x38/* Slot Control 2 */ Signature · 1 line
2.51.0