[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20251101164132.14145-1-18255117159@163.com>
Date: Sun, 2 Nov 2025 00:41:32 +0800
From: Hans Zhang <18255117159@....com>
To: bhelgaas@...gle.com,
helgaas@...nel.org
Cc: linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org,
Hans Zhang <18255117159@....com>,
Manivannan Sadhasivam <mani@...nel.org>
Subject: [PATCH v3 1/1] PCI: of: Relax max-link-speed check to support PCIe Gen5/Gen6
The existing code restricted `max-link-speed` to values 1~4 (Gen1~Gen4),
but current SOCs using Synopsys/Cadence IP may require Gen5/Gen6 support.
While DT binding validation already checks this property, the code-level
validation in `of_pci_get_max_link_speed` also needs to be updated to allow
values up to 6, ensuring compatibility with newer PCIe generations.
Signed-off-by: Hans Zhang <18255117159@....com>
Reviewed-by: Manivannan Sadhasivam <mani@...nel.org>
---
Changes for v3:
- Modify the commit message.
- Add Reviewed-by tag.
Changes for v2:
https://patchwork.kernel.org/project/linux-pci/cover/20250529021026.475861-1-18255117159@163.com/
- The following files have been deleted:
Documentation/devicetree/bindings/pci/pci.txt
Update to this file again:
dtschema/schemas/pci/pci-bus-common.yaml
---
drivers/pci/of.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index 3579265f1198..53928e4b3780 100644
--- a/drivers/pci/of.c
+++ b/drivers/pci/of.c
@@ -890,7 +890,7 @@ int of_pci_get_max_link_speed(struct device_node *node)
u32 max_link_speed;
if (of_property_read_u32(node, "max-link-speed", &max_link_speed) ||
- max_link_speed == 0 || max_link_speed > 4)
+ max_link_speed == 0 || max_link_speed > 6)
return -EINVAL;
return max_link_speed;
--
2.34.1
Powered by blists - more mailing lists