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]
Date:   Tue, 22 Jun 2021 21:00:55 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Jian-Hong Pan <jhp@...lessos.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Stefan Wahren <stefan.wahren@...e.com>,
        Doug Berger <opendmb@...il.com>
Cc:     Andrew Lunn <andrew@...n.ch>,
        bcm-kernel-feedback-list@...adcom.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux@...lessos.org,
        linux-rpi-kernel@...ts.infradead.org
Subject: Re: [PATCH v2] net: bcmgenet: Fix attaching to PYH failed on RPi 4B

The subject should be fixed s/PYH/PHY/ and also probably reworded to be:

net: bcmgenet: Add mdio-bcm-unimac soft dependency

On 6/22/2021 8:28 PM, Jian-Hong Pan wrote:
> The Broadcom UniMAC MDIO bus from mdio-bcm-unimac module comes too late.

It is not just coming too late, there is also no way for the module 
loader to figure out the dependency between GENET and its MDIO bus 
driver unless we provide this MODULE_SOFTDEP hint.

> So, GENET cannot find the ethernet PHY on UniMAC MDIO bus. This leads
> GENET fail to attach the PHY as following log:
> 
> bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
> ...
> could not attach to PHY
> bcmgenet fd580000.ethernet eth0: failed to connect to PHY
> uart-pl011 fe201000.serial: no DMA platform data
> libphy: bcmgenet MII bus: probed
> ...
> unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
> 
> This patch adds the soft dependency to load mdio-bcm-unimac module
> before genet module to avoid the issue.
> 
> Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=213485
> Signed-off-by: Jian-Hong Pan <jhp@...lessos.org>

Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
Fixes: 9a4e79697009 ("net: bcmgenet: utilize generic Broadcom UniMAC 
MDIO controller driver")

> ---
> v2: Load mdio-bcm-unimac before genet module instead of trying to
>      connect the PHY in a loop.
> 
>   drivers/net/ethernet/broadcom/genet/bcmgenet.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> index fcca023f22e5..41f7f078cd27 100644
> --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> @@ -4296,3 +4296,4 @@ MODULE_AUTHOR("Broadcom Corporation");
>   MODULE_DESCRIPTION("Broadcom GENET Ethernet controller driver");
>   MODULE_ALIAS("platform:bcmgenet");
>   MODULE_LICENSE("GPL");
> +MODULE_SOFTDEP("pre: mdio-bcm-unimac");
> 

-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ