lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bdc2d3c3-546d-a007-4516-feb500a3f48b@microchip.com>
Date:   Wed, 27 Oct 2021 10:40:36 +0200
From:   Nicolas Ferre <nicolas.ferre@...rochip.com>
To:     Claudiu Beznea - M18063 <Claudiu.Beznea@...rochip.com>,
        Guenter Roeck <linux@...ck-us.net>
CC:     "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Sean Anderson <sean.anderson@...o.com>,
        Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH] net: macb: Fix mdio child node detection

On 27/10/2021 at 10:38, Claudiu Beznea - M18063 wrote:
> On 26.10.2021 20:39, Guenter Roeck wrote:
>> Commit 4d98bb0d7ec2 ("net: macb: Use mdio child node for MDIO bus if it
>> exists") added code to detect if a 'mdio' child node exists to the macb
>> driver. Ths added code does, however, not actually check if the child node
>> exists, but if the parent node exists. This results in errors such as
>>
>> macb 10090000.ethernet eth0: Could not attach PHY (-19)
>>
>> if there is no 'mdio' child node. Fix the code to actually check for
>> the child node.
>>
>> Fixes: 4d98bb0d7ec2 ("net: macb: Use mdio child node for MDIO bus if it exists")
>> Cc: Sean Anderson <sean.anderson@...o.com>
>> Cc: Andrew Lunn <andrew@...n.ch>
>> Signed-off-by: Guenter Roeck <linux@...ck-us.net>> ---
> 
> Patch solves the failure also on sama5d2_xplained. You can add:
> 
> Tested-by: Claudiu Beznea <claudiu.beznea@...rochip.com>

Guener, Claudiu, thanks so much!
Acked-by: Nicolas Ferre <nicolas.ferre@...rochip.com>

Best regards,
   Nicolas


>>   drivers/net/ethernet/cadence/macb_main.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
>> index 309371abfe23..ffce528aa00e 100644
>> --- a/drivers/net/ethernet/cadence/macb_main.c
>> +++ b/drivers/net/ethernet/cadence/macb_main.c
>> @@ -901,7 +901,7 @@ static int macb_mdiobus_register(struct macb *bp)
>>           * directly under the MAC node
>>           */
>>          child = of_get_child_by_name(np, "mdio");
>> -       if (np) {
>> +       if (child) {
>>                  int ret = of_mdiobus_register(bp->mii_bus, child);
>>
>>                  of_node_put(child);
>> --
>> 2.33.0
>>
> 


-- 
Nicolas Ferre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ