From: Florian Fainelli <f.fainelli@gmail.com>
To: Jian-Hong Pan <jhp@endlessos.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Stefan Wahren <stefan.wahren@i2se.com>,
Doug Berger <opendmb@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux@endlessos.org,
linux-rpi-kernel@lists.infradead.org
Subject: Re: [PATCH v2] net: bcmgenet: Fix attaching to PYH failed on RPi 4B
Date: Tue, 22 Jun 2021 21:00:55 -0700 [thread overview]
Message-ID: <aa2ec0dd-6b43-099f-da0a-768d1668ec50@gmail.com> (raw)
In-Reply-To: <20210623032802.3377-1-jhp@endlessos.org>
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@endlessos.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.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
next prev parent reply other threads:[~2021-06-23 4:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 10:33 [PATCH] net: bcmgenet: Fix attaching to PYH failed on RPi 4B Jian-Hong Pan
2021-06-21 13:09 ` Andrew Lunn
2021-06-21 16:37 ` Florian Fainelli
2021-06-21 16:47 ` Florian Fainelli
2021-06-21 16:56 ` Peter Robinson
2021-06-21 20:15 ` Stefan Wahren
2021-06-21 21:47 ` Florian Fainelli
2021-06-22 6:29 ` Jian-Hong Pan
2021-06-22 6:50 ` Heiner Kallweit
2021-06-22 7:46 ` Jian-Hong Pan
2021-06-23 3:28 ` [PATCH v2] " Jian-Hong Pan
2021-06-23 4:00 ` Florian Fainelli [this message]
2021-06-23 20:50 ` patchwork-bot+netdevbpf
2021-06-23 21:19 ` Florian Fainelli
2021-06-24 2:47 ` Jian-Hong Pan
2021-06-24 3:27 ` Florian Fainelli
2021-06-24 3:28 ` Jian-Hong Pan
2021-06-24 3:22 ` [PATCH v3] net: bcmgenet: Add mdio-bcm-unimac soft dependency Jian-Hong Pan
2021-06-24 23:00 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aa2ec0dd-6b43-099f-da0a-768d1668ec50@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=jhp@endlessos.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux@endlessos.org \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=stefan.wahren@i2se.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).