[PATCH 2/3] net: stmmac: qcom-ethqos: Enable RX programmable swap on qcs615
Krzysztof Kozlowski
krzk at kernel.org
Wed Dec 25 03:37:52 PST 2024
On 25/12/2024 11:04, Yijie Yang wrote:
> 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, ðqos->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.
> + ethqos->needs_rx_prog_swap = true;
> + else
> + ethqos->needs_rx_prog_swap =
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list