lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sat,  5 Dec 2020 10:28:13 -0500
From:   Sven Van Asbroeck <>
To:     Woojung Huh <>,
        Microchip Linux Driver Support <>,
        Andrew Lunn <>,
        Vivien Didelot <>,
        Florian Fainelli <>,
        Vladimir Oltean <>,
        David S Miller <>,
        Jakub Kicinski <>
Cc:     Sven Van Asbroeck <>,
        Helmut Grohne <>,,
Subject: [PATCH net v1 1/2] net: dsa: microchip: fix devicetree parsing of cpu node

From: Sven Van Asbroeck <>

On the ksz8795, if the devicetree contains a cpu node,
devicetree parsing fails and the whole driver errors out.

Fix the devicetree parsing code by making it use the
correct number of ports.

Fixes: 912aae27c6af ("net: dsa: microchip: really look for phy-mode in port nodes")
Tested-by: Sven Van Asbroeck <> # ksz8795
Signed-off-by: Sven Van Asbroeck <>

Tree: git:// # 905b2032fa42

To: Woojung Huh <>
To: Microchip Linux Driver Support <>
To: Andrew Lunn <>
To: Vivien Didelot <>
To: Florian Fainelli <>
To: Vladimir Oltean <>
To: "David S. Miller" <>
To: Jakub Kicinski <>
Cc: Helmut Grohne <>

 drivers/net/dsa/microchip/ksz_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index e5f047129b15..17b804c44c53 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -431,7 +431,7 @@ int ksz_switch_register(struct ksz_device *dev,
 				if (of_property_read_u32(port, "reg",
-				if (port_num >= dev->port_cnt)
+				if (port_num >= dev->ds->num_ports)
 					return -EINVAL;

Powered by blists - more mailing lists