[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <533872e1-b323-4bca-aacc-4d3cfbed53bd@lunn.ch>
Date: Thu, 22 Jun 2023 17:36:40 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Florian Fainelli <florian.fainelli@...adcom.com>
Cc: netdev@...r.kernel.org, hkallweit1@...il.com, ansuelsmth@...il.com,
rmk+kernel@...linux.org.uk, Doug Berger <opendmb@...il.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] net: bcmgenet: Ensure MDIO unregistration has clocks
enabled
On Thu, Jun 22, 2023 at 03:31:07AM -0700, Florian Fainelli wrote:
> With support for Ethernet PHY LEDs having been added, while
> unregistering a MDIO bus and its child device liks PHYs there may be
> "late" accesses to the MDIO bus. One typical use case is setting the PHY
> LEDs brightness to OFF for instance.
>
> We need to ensure that the MDIO bus controller remains entirely
> functional since it runs off the main GENET adapter clock.
So this clock is enabled in bcmgenet_open() and disabled in
bcmgenet_close(). The assumption being, the MDIO bus is only used when
the interface is up.
How does this work when there is an MDIO based switch attached? I had
similar problems with the FEC and mv88e6xxx. DSA would try to talk to
the switch with the master interface down, and MDIO would time out. I
needed to add runtime PM support to the MDIO bus ops.
Andrew
Powered by blists - more mailing lists