Thread (24 messages) 24 messages, 4 authors, 2025-01-21

Re: [PATCH 2/3] net: stmmac: qcom-ethqos: Enable RX programmable swap on qcs615

From: Andrew Lunn <andrew@lunn.ch>
Date: 2024-12-26 17:21:23
Also in: linux-arm-msm, linux-devicetree, lkml, netdev

On Thu, Dec 26, 2024 at 10:29:45AM +0800, Yijie Yang wrote:

On 2024-12-25 19:37, Krzysztof Kozlowski wrote:
quoted
On 25/12/2024 11:04, Yijie Yang wrote:
quoted
  static int qcom_ethqos_probe(struct platform_device *pdev)
  {
-	struct device_node *np = pdev->dev.of_node;
+	struct device_node *np = pdev->dev.of_node, *root;
  	const struct ethqos_emac_driver_data *data;
  	struct plat_stmmacenet_data *plat_dat;
  	struct stmmac_resources stmmac_res;
@@ -810,6 +805,15 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
  	ret = of_get_phy_mode(np, &ethqos->phy_mode);
  	if (ret)
  		return dev_err_probe(dev, ret, "Failed to get phy mode\n");
+
+	root = of_find_node_by_path("/");
+	if (root && of_device_is_compatible(root, "qcom,sa8540p-ride"))

Nope, your drivers are not supposed to poke root compatibles. Drop and
fix your driver to behave correctly for all existing devices.
Since this change introduces a new flag in the DTS, we must maintain ABI
compatibility with the kernel. The new flag is specific to the board, so I
need to ensure root nodes are matched to allow older boards to continue
functioning as before. I'm happy to adopt that approach if there are any
more elegant solutions.
Why is it specific to this board? Does the board have a PHY which is
broken and requires this property? What we are missing are the details
needed to help you get to the correct way to solve the problem you are
facing.

	Andrew

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help