lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zi4Co2TEqmeATTgy@shell.armlinux.org.uk>
Date: Sun, 28 Apr 2024 09:02:43 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Jiawen Wu <jiawenwu@...stnetic.com>
Cc: "'David S. Miller'" <davem@...emloft.net>,
	'Eric Dumazet' <edumazet@...gle.com>,
	'Jakub Kicinski' <kuba@...nel.org>,
	'Paolo Abeni' <pabeni@...hat.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: txgbe: use phylink_pcs_change() to report
 PCS link change events

On Sun, Apr 28, 2024 at 03:50:24PM +0800, Jiawen Wu wrote:
> On Sat, April 27, 2024 12:18 AM, Russell King <rmk@...linux.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@...linux.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!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ