* [PATCH net-next] net: txgbe: use phylink_pcs_change() to report PCS link change events
@ 2024-04-26 16:18 Russell King (Oracle)
2024-04-28 7:50 ` Jiawen Wu
2024-04-30 2:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Russell King (Oracle) @ 2024-04-26 16:18 UTC (permalink / raw)
To: Jiawen Wu
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev
Use phylink_pcs_change() when reporting changes in PCS link state to
phylink as the interrupts are informing us about changes to the PCS
state.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
index 93295916b1d2..5f502265f0a6 100644
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
@@ -302,7 +302,7 @@ irqreturn_t txgbe_link_irq_handler(int irq, void *data)
status = rd32(wx, TXGBE_CFG_PORT_ST);
up = !!(status & TXGBE_CFG_PORT_ST_LINK_UP);
- phylink_mac_change(wx->phylink, up);
+ phylink_pcs_change(&txgbe->xpcs->pcs, up);
return IRQ_HANDLED;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH net-next] net: txgbe: use phylink_pcs_change() to report PCS link change events
2024-04-26 16:18 [PATCH net-next] net: txgbe: use phylink_pcs_change() to report PCS link change events Russell King (Oracle)
@ 2024-04-28 7:50 ` Jiawen Wu
2024-04-28 8:02 ` Russell King (Oracle)
2024-04-30 2:20 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Jiawen Wu @ 2024-04-28 7:50 UTC (permalink / raw)
To: 'Russell King (Oracle)'
Cc: 'David S. Miller', 'Eric Dumazet',
'Jakub Kicinski', 'Paolo Abeni', netdev
On Sat, April 27, 2024 12:18 AM, Russell King <rmk@armlinux.org.uk> wrote:
> Use phylink_pcs_change() when reporting changes in PCS link state to
> phylink as the interrupts are informing us about changes to the PCS
> state.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
> index 93295916b1d2..5f502265f0a6 100644
> --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
> +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
> @@ -302,7 +302,7 @@ irqreturn_t txgbe_link_irq_handler(int irq, void *data)
> status = rd32(wx, TXGBE_CFG_PORT_ST);
> up = !!(status & TXGBE_CFG_PORT_ST_LINK_UP);
>
> - phylink_mac_change(wx->phylink, up);
> + phylink_pcs_change(&txgbe->xpcs->pcs, up);
>
> return IRQ_HANDLED;
> }
Does this only affect the log of phylink_dbg()?
If so,
Acked-by: Jiawen Wu <jiawenwu@trustnetic.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: txgbe: use phylink_pcs_change() to report PCS link change events
2024-04-28 7:50 ` Jiawen Wu
@ 2024-04-28 8:02 ` Russell King (Oracle)
0 siblings, 0 replies; 4+ messages in thread
From: Russell King (Oracle) @ 2024-04-28 8:02 UTC (permalink / raw)
To: Jiawen Wu
Cc: 'David S. Miller', 'Eric Dumazet',
'Jakub Kicinski', 'Paolo Abeni', netdev
On Sun, Apr 28, 2024 at 03:50:24PM +0800, Jiawen Wu wrote:
> On Sat, April 27, 2024 12:18 AM, Russell King <rmk@armlinux.org.uk> wrote:
> > Use phylink_pcs_change() when reporting changes in PCS link state to
> > phylink as the interrupts are informing us about changes to the PCS
> > state.
> >
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > ---
> > drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
> > index 93295916b1d2..5f502265f0a6 100644
> > --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
> > +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
> > @@ -302,7 +302,7 @@ irqreturn_t txgbe_link_irq_handler(int irq, void *data)
> > status = rd32(wx, TXGBE_CFG_PORT_ST);
> > up = !!(status & TXGBE_CFG_PORT_ST_LINK_UP);
> >
> > - phylink_mac_change(wx->phylink, up);
> > + phylink_pcs_change(&txgbe->xpcs->pcs, up);
> >
> > return IRQ_HANDLED;
> > }
>
> Does this only affect the log of phylink_dbg()?
It means that phylink won't react unless the PCS is being used. The link
status should be coming from the PCS block since MII itself doesn't have
the notion of link status.
I'm trying to get rid of phylink_mac_change(), which was fine back in
the days when it was invented (when phylink didn't distinguish between
the MAC and PCS) but it now does.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: txgbe: use phylink_pcs_change() to report PCS link change events
2024-04-26 16:18 [PATCH net-next] net: txgbe: use phylink_pcs_change() to report PCS link change events Russell King (Oracle)
2024-04-28 7:50 ` Jiawen Wu
@ 2024-04-30 2:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-30 2:20 UTC (permalink / raw)
To: Russell King; +Cc: jiawenwu, davem, edumazet, kuba, pabeni, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 26 Apr 2024 17:18:08 +0100 you wrote:
> Use phylink_pcs_change() when reporting changes in PCS link state to
> phylink as the interrupts are informing us about changes to the PCS
> state.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [net-next] net: txgbe: use phylink_pcs_change() to report PCS link change events
https://git.kernel.org/netdev/net-next/c/dd1941f801bc
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] 4+ messages in thread
end of thread, other threads:[~2024-04-30 2:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-26 16:18 [PATCH net-next] net: txgbe: use phylink_pcs_change() to report PCS link change events Russell King (Oracle)
2024-04-28 7:50 ` Jiawen Wu
2024-04-28 8:02 ` Russell King (Oracle)
2024-04-30 2:20 ` patchwork-bot+netdevbpf
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).