All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: phy: fixed_phy: set phy_mask before calling mdiobus_register()
@ 2022-06-06 20:02 Rasmus Villemoes
  2022-06-14  6:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Rasmus Villemoes @ 2022-06-06 20:02 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Rasmus Villemoes, netdev, linux-kernel

There's no point probing for phys on this artificial bus, so we can
save a little bit of boot time by telling mdiobus_register() not to do
that.

This doesn't have any functional change, since, at this point,
fixed_mdio_read() returns 0xffff for all addresses/registers, so

  mdiobus_scan() -> get_phy_device() -> get_phy_c22_id()

will return -ENODEV, which is just ignored.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
I was trying to debug something and got distracted by the printk() I
added in get_phy_device() triggering 32 times in a row.

drivers/net/phy/fixed_phy.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index 03abe6233bbb..aef739c20ac4 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -353,6 +353,7 @@ static int __init fixed_mdio_bus_init(void)
 	fmb->mii_bus->parent = &pdev->dev;
 	fmb->mii_bus->read = &fixed_mdio_read;
 	fmb->mii_bus->write = &fixed_mdio_write;
+	fmb->mii_bus->phy_mask = ~0;
 
 	ret = mdiobus_register(fmb->mii_bus);
 	if (ret)
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: phy: fixed_phy: set phy_mask before calling mdiobus_register()
  2022-06-06 20:02 [PATCH net-next] net: phy: fixed_phy: set phy_mask before calling mdiobus_register() Rasmus Villemoes
@ 2022-06-14  6:30 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-14  6:30 UTC (permalink / raw)
  To: Rasmus Villemoes
  Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon,  6 Jun 2022 22:02:08 +0200 you wrote:
> There's no point probing for phys on this artificial bus, so we can
> save a little bit of boot time by telling mdiobus_register() not to do
> that.
> 
> This doesn't have any functional change, since, at this point,
> fixed_mdio_read() returns 0xffff for all addresses/registers, so
> 
> [...]

Here is the summary with links:
  - [net-next] net: phy: fixed_phy: set phy_mask before calling mdiobus_register()
    https://git.kernel.org/netdev/net-next/c/bfa54812f0bc

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-14  6:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-06 20:02 [PATCH net-next] net: phy: fixed_phy: set phy_mask before calling mdiobus_register() Rasmus Villemoes
2022-06-14  6:30 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.