[openwrt/openwrt] generic: phy: aquantia: fix MDI pair property parsing

LEDE Commits lede-commits at lists.infradead.org
Mon Sep 23 09:38:49 PDT 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7f46e231eb9864c90db296afea3abd0010b9b5e5

commit 7f46e231eb9864c90db296afea3abd0010b9b5e5
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Sep 23 18:16:51 2024 +0200

    generic: phy: aquantia: fix MDI pair property parsing
    
    of_property_read_u32 returns -EINVAL when property does not exist,
    according to the documentation -ENOENT is not a valid return code.
    
    So, instead of checking for -ENOENT check for -EINVAL as otherwise the
    blamed commit breaks AQR probe since it will return -EINVAL during probe.
    
    Fixes: cb2a11f49c98 ("generic: phy: aquantia: add pending patch to force MDI pair order")
    Link: https://github.com/openwrt/openwrt/pull/16466
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../752-net-phy-aquantia-allow-forcing-order-of-MDI-pairs.patch         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/generic/pending-6.6/752-net-phy-aquantia-allow-forcing-order-of-MDI-pairs.patch b/target/linux/generic/pending-6.6/752-net-phy-aquantia-allow-forcing-order-of-MDI-pairs.patch
index 97e2953a50..f3ae893b32 100644
--- a/target/linux/generic/pending-6.6/752-net-phy-aquantia-allow-forcing-order-of-MDI-pairs.patch
+++ b/target/linux/generic/pending-6.6/752-net-phy-aquantia-allow-forcing-order-of-MDI-pairs.patch
@@ -74,7 +74,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +	ret = of_property_read_u32(np, "marvell,mdi-cfg-order", &mdi_conf);
 +
 +	/* Do nothing in case property "marvell,mdi-cfg-order" is not present */
-+	if (ret == -ENOENT)
++	if (ret == -EINVAL)
 +		return 0;
 +
 +	if (ret)




More information about the lede-commits mailing list