From: Sasha Levin <sashal@kernel.org>
To: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Jacob Keller <jacob.e.keller@intel.com>,
"David S . Miller" <davem@davemloft.net>,
opendmb@gmail.com, andrew@lunn.ch, hkallweit1@gmail.com,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 6.8 39/68] net: mdio: mdio-bcm-unimac: Manage clock around I/O accesses
Date: Sun, 7 Apr 2024 19:37:12 -0400 [thread overview]
Message-ID: <ZhMuKCJ7w-0PtJhV@sashalap> (raw)
In-Reply-To: <888b10eb-cdd5-43bb-a501-471aa28b1153@broadcom.com>
On Tue, Apr 02, 2024 at 05:41:44AM -0700, Florian Fainelli wrote:
>
>
>On 3/29/2024 5:25 AM, Sasha Levin wrote:
>>From: Florian Fainelli <florian.fainelli@broadcom.com>
>>
>>[ Upstream commit ee975351cf0c2a11cdf97eae58265c126cb32850 ]
>>
>>Up until now we have managed not to have the mdio-bcm-unimac manage its
>>clock except during probe and suspend/resume. This works most of the
>>time, except where it does not.
>>
>>With a fully modular build, we can get into a situation whereby the
>>GENET driver is fully registered, and so is the mdio-bcm-unimac driver,
>>however the Ethernet PHY driver is not yet, because it depends on a
>>resource that is not yet available (e.g.: GPIO provider). In that state,
>>the network device is not usable yet, and so to conserve power, the
>>GENET driver will have turned off its "main" clock which feeds its MDIO
>>controller.
>>
>>When the PHY driver finally probes however, we make an access to the PHY
>>registers to e.g.: disable interrupts, and this causes a bus error
>>within the MDIO controller space because the MDIO controller clock(s)
>>are turned off.
>>
>>To remedy that, we manage the clock around all of the I/O accesses to
>>the hardware which are done exclusively during read, write and clock
>>divider configuration.
>>
>>This ensures that the register space is accessible, and this also
>>ensures that there are not unnecessarily elevated reference counts
>>keeping the clocks active when the network device is administratively
>>turned off. It would be the case with the previous way of managing the
>>clock.
>>
>>Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
>>Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
>>Signed-off-by: David S. Miller <davem@davemloft.net>
>>Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>Please drop this patch, it is usable in isolation and needs 2
>additional patches to be meaningful:
>
>https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ee2b4cf8b281606bbf332cbd73ce2a73eac417f0
>https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>/commit/?id=ba0b78371c46b2104197ff2c244f13f011ddfa80
Ack, thanks!
--
Thanks,
Sasha
next prev parent reply other threads:[~2024-04-07 23:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240329122652.3082296-1-sashal@kernel.org>
2024-03-29 12:24 ` [PATCH AUTOSEL 6.8 03/68] bnx2x: Fix firmware version string character counts Sasha Levin
2024-03-29 12:25 ` [PATCH AUTOSEL 6.8 04/68] batman-adv: Return directly after a failed batadv_dat_select_candidates() in batadv_dat_forward_data() Sasha Levin
2024-03-29 12:25 ` [PATCH AUTOSEL 6.8 05/68] batman-adv: Improve exception handling in batadv_throw_uevent() Sasha Levin
2024-03-29 12:25 ` [PATCH AUTOSEL 6.8 07/68] net: stmmac: dwmac-starfive: Add support for JH7100 SoC Sasha Levin
2024-03-29 12:25 ` [PATCH AUTOSEL 6.8 08/68] net: phy: phy_device: Prevent nullptr exceptions on ISR Sasha Levin
2024-03-29 12:25 ` [PATCH AUTOSEL 6.8 14/68] net: dsa: qca8k: put MDIO controller OF node if unavailable Sasha Levin
2024-03-29 12:25 ` [PATCH AUTOSEL 6.8 28/68] net: add netdev_lockdep_set_classes() to virtual drivers Sasha Levin
2024-03-29 12:25 ` [PATCH AUTOSEL 6.8 37/68] ionic: set adminq irq affinity Sasha Levin
2024-03-29 12:25 ` [PATCH AUTOSEL 6.8 39/68] net: mdio: mdio-bcm-unimac: Manage clock around I/O accesses Sasha Levin
2024-04-02 12:41 ` Florian Fainelli
2024-04-07 23:37 ` Sasha Levin [this message]
2024-03-29 12:25 ` [PATCH AUTOSEL 6.8 49/68] net: pcs: xpcs: Return EINVAL in the internal methods Sasha Levin
2024-03-29 12:25 ` [PATCH AUTOSEL 6.8 58/68] wifi: cfg80211: check A-MSDU format more carefully Sasha Levin
2024-03-29 12:25 ` [PATCH AUTOSEL 6.8 63/68] ice: use relative VSI index for VFs instead of PF VSI number Sasha Levin
2024-03-29 12:26 ` [PATCH AUTOSEL 6.8 64/68] net/smc: reduce rtnl pressure in smc_pnet_create_pnetids_list() Sasha Levin
2024-03-29 12:26 ` [PATCH AUTOSEL 6.8 65/68] netdev: let netlink core handle -EMSGSIZE errors Sasha Levin
2024-03-29 12:26 ` [PATCH AUTOSEL 6.8 68/68] Bluetooth: Add new quirk for broken read key length on ATS2851 Sasha Levin
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=ZhMuKCJ7w-0PtJhV@sashalap \
--to=sashal@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
/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).