[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YvUEgKl6fpHwMwuS@lunn.ch>
Date: Thu, 11 Aug 2022 15:30:40 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Csókás Bence <csokas.bence@...lan.hu>
Cc: netdev@...r.kernel.org, Richard Cochran <richardcochran@...il.com>,
Fugang Duan <fugang.duan@....com>
Subject: Re: [PATCH] fec: Restart PPS after link state change
> `fep->pps_enable` is the state of the PPS the driver *believes* to be the
> case. After a reset, this belief may or may not be true anymore: if the
> driver believed formerly that the PPS is down, then after a reset, its
> belief will still be correct, thus nothing needs to be done about the
> situation. If, however, the driver thought that PPS was up, after controller
> reset, it no longer holds, so we need to update our world-view
> (`fep->pps_enable = 0;`), and then correct for the fact that PPS just
> unexpectedly stopped.
Your way of doing it just seems very unclean. I would make
fec_ptp_enable_pps() read the actual status from the
hardware. fep->pps_enable then has the clear meaning of user space
requested it should be enabled.
Andrew
Powered by blists - more mailing lists