Subject: Re: [PATCH net-next] net: phy: fixed_phy: Fix fixed_phy not checking GPIO

From: Andrew Lunn <[email-masked]>
Date: Thu, 7 Feb 2019 04:00:52 +0100

On Wed, Feb 06, 2019 at 10:10:40AM -0800, Moritz Fischer wrote:
> Fix fixed_phy not checking GPIO if no link_update callback
> is registered.
> 
> Signed-off-by: Moritz Fischer <[email-masked]>
> ---
> 
> Hi all,
> 
> I've been trying to figure out where exactly this broke,
> it must've been somewhere when the file was refactored
> in connection with phylink?

After some digging, i now understand. It was 'broken' right from the
beginning. The only user of this when i introduced it was a board with
an Ethernet switch driven by a DSA driver. The GPIO is used to
indicate if an SFP has a loss of signal indication.

DSA would look for the fixed-link properties for the switch port, and
if it found it, use of_phy_register_fixed_link() to register a fixed
link.

However, the broadcom SF2 switch driver needs to use the callback
method of reporting link up/down for a fixed-link. So the DSA core
always registers a generic DSA callback, which then calls into the DSA
driver if its driver structure implements the callback.

So we always had the case of both, so despite it being broken, it
worked...

	Andrew