* [PATCH v2] PCI: Update code comment on PCI_EXP_LNKCAP_SLS for PCIe r3.0
@ 2024-12-16 19:18 Lukas Wunner
2024-12-17 15:09 ` Niklas Schnelle
2024-12-18 23:51 ` Krzysztof Wilczyński
0 siblings, 2 replies; 3+ messages in thread
From: Lukas Wunner @ 2024-12-16 19:18 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, Niklas Schnelle, Ilpo Jarvinen
Niklas notes that the code comment on the PCI_EXP_LNKCAP_SLS macro is
outdated as it reflects the meaning of the field prior to PCIe r3.0.
Update it to avoid confusion.
Reported-by: Niklas Schnelle <niks@kernel.org>
Closes: https://lore.kernel.org/r/70829798889c6d779ca0f6cd3260a765780d1369.camel@kernel.org/
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
Only change v1 -> v2: Add closing parenthesis.
Seems there's a million ways to botch even the most trivial patch. :(
include/uapi/linux/pci_regs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
index 1601c7e..02d0ba2 100644
--- a/include/uapi/linux/pci_regs.h
+++ b/include/uapi/linux/pci_regs.h
@@ -533,7 +533,7 @@
#define PCI_EXP_DEVSTA_TRPND 0x0020 /* Transactions Pending */
#define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V1 12 /* v1 endpoints without link end here */
#define PCI_EXP_LNKCAP 0x0c /* Link Capabilities */
-#define PCI_EXP_LNKCAP_SLS 0x0000000f /* Supported Link Speeds */
+#define PCI_EXP_LNKCAP_SLS 0x0000000f /* Max Link Speed (prior to PCIe r3.0: Supported Link Speeds) */
#define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */
#define PCI_EXP_LNKCAP_SLS_5_0GB 0x00000002 /* LNKCAP2 SLS Vector bit 1 */
#define PCI_EXP_LNKCAP_SLS_8_0GB 0x00000003 /* LNKCAP2 SLS Vector bit 2 */
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] PCI: Update code comment on PCI_EXP_LNKCAP_SLS for PCIe r3.0
2024-12-16 19:18 [PATCH v2] PCI: Update code comment on PCI_EXP_LNKCAP_SLS for PCIe r3.0 Lukas Wunner
@ 2024-12-17 15:09 ` Niklas Schnelle
2024-12-18 23:51 ` Krzysztof Wilczyński
1 sibling, 0 replies; 3+ messages in thread
From: Niklas Schnelle @ 2024-12-17 15:09 UTC (permalink / raw)
To: Lukas Wunner, Bjorn Helgaas; +Cc: linux-pci, Niklas Schnelle, Ilpo Jarvinen
On Mon, 2024-12-16 at 20:18 +0100, Lukas Wunner wrote:
> Niklas notes that the code comment on the PCI_EXP_LNKCAP_SLS macro is
> outdated as it reflects the meaning of the field prior to PCIe r3.0.
> Update it to avoid confusion.
>
> Reported-by: Niklas Schnelle <niks@kernel.org>
> Closes: https://lore.kernel.org/r/70829798889c6d779ca0f6cd3260a765780d1369.camel@kernel.org/
> Signed-off-by: Lukas Wunner <lukas@wunner.de>
> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
> Only change v1 -> v2: Add closing parenthesis.
> Seems there's a million ways to botch even the most trivial patch. :(
>
> include/uapi/linux/pci_regs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
> index 1601c7e..02d0ba2 100644
> --- a/include/uapi/linux/pci_regs.h
> +++ b/include/uapi/linux/pci_regs.h
> @@ -533,7 +533,7 @@
> #define PCI_EXP_DEVSTA_TRPND 0x0020 /* Transactions Pending */
> #define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V1 12 /* v1 endpoints without link end here */
> #define PCI_EXP_LNKCAP 0x0c /* Link Capabilities */
> -#define PCI_EXP_LNKCAP_SLS 0x0000000f /* Supported Link Speeds */
> +#define PCI_EXP_LNKCAP_SLS 0x0000000f /* Max Link Speed (prior to PCIe r3.0: Supported Link Speeds) */
> #define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */
> #define PCI_EXP_LNKCAP_SLS_5_0GB 0x00000002 /* LNKCAP2 SLS Vector bit 1 */
> #define PCI_EXP_LNKCAP_SLS_8_0GB 0x00000003 /* LNKCAP2 SLS Vector bit 2 */
Thanks for the quick turn around!
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] PCI: Update code comment on PCI_EXP_LNKCAP_SLS for PCIe r3.0
2024-12-16 19:18 [PATCH v2] PCI: Update code comment on PCI_EXP_LNKCAP_SLS for PCIe r3.0 Lukas Wunner
2024-12-17 15:09 ` Niklas Schnelle
@ 2024-12-18 23:51 ` Krzysztof Wilczyński
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Wilczyński @ 2024-12-18 23:51 UTC (permalink / raw)
To: Lukas Wunner; +Cc: Bjorn Helgaas, linux-pci, Niklas Schnelle, Ilpo Jarvinen
Hello,
> Niklas notes that the code comment on the PCI_EXP_LNKCAP_SLS macro is
> outdated as it reflects the meaning of the field prior to PCIe r3.0.
> Update it to avoid confusion.
Applied to misc, thank you!
[1/1] PCI: Update code comment on PCI_EXP_LNKCAP_SLS for PCIe r3.0
https://git.kernel.org/pci/pci/c/537470b7f131
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-18 23:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-16 19:18 [PATCH v2] PCI: Update code comment on PCI_EXP_LNKCAP_SLS for PCIe r3.0 Lukas Wunner
2024-12-17 15:09 ` Niklas Schnelle
2024-12-18 23:51 ` Krzysztof Wilczyński
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox