[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1ku2QvMmQdWTa57@lunn.ch>
Date: Wed, 26 Oct 2022 14:58:01 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net,
netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
saeedm@...dia.com, corbet@....net, michael.chan@...adcom.com,
huangguangbin2@...wei.com, chenhao288@...ilicon.com,
moshet@...dia.com, linux@...pel-privat.de,
linux-doc@...r.kernel.org
Subject: Re: [PATCH net-next] ethtool: linkstate: add a statistic for PHY
down events
> What is the best way to implement it on devices without dedicated HW
> counter? I assume in most cases only PHY driver would not real state of
> link.
I would hook into the PHY state machine. PHY_RUNNING means the link is
up. If it transitions to PHY_NOLINK the link has been lost.
Andrew
Powered by blists - more mailing lists