[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191119.184604.2256080146904190716.davem@davemloft.net>
Date: Tue, 19 Nov 2019 18:46:04 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: rmk+kernel@...linux.org.uk
Cc: andrew@...n.ch, f.fainelli@...il.com, hkallweit1@...il.com,
vivien.didelot@...il.com, sean.wang@...iatek.com,
matthias.bgg@...il.com, nicolas.ferre@...rochip.com,
thomas.petazzoni@...tlin.com, nbd@...nwrt.org, john@...ozen.org,
Mark-MC.Lee@...iatek.com, peppe.cavallaro@...com,
alexandre.torgue@...com, joabreu@...opsys.com,
mcoquelin.stm32@...il.com, radhey.shyam.pandey@...inx.com,
michal.simek@...inx.com, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
linux-stm32@...md-mailman.stormreply.com
Subject: Re: [RFC PATCH net-next] net: phylink: rename mac_link_state() op
to mac_pcs_get_state()
From: Russell King <rmk+kernel@...linux.org.uk>
Date: Tue, 19 Nov 2019 12:36:00 +0000
> Rename the mac_link_state() method to mac_pcs_get_state() to make it
> clear that it should be returning the MACs PCS current state, which
> is used for inband negotiation rather than just reading back what the
> MAC has been configured for. Update the documentation to explicitly
> mention that this is for inband.
>
> We drop the return value as well; most of phylink doesn't check the
> return value and it is not clear what it should do on error - instead
> arrange for state->link to be false.
>
> Signed-off-by: Russell King <rmk+kernel@...linux.org.uk>
> ---
> This is something I'd like to do to make it clearer what phylink expects
> of this function, and that it shouldn't just read-back how the MAC was
> configured. However, it will require some testing and review as it
> changes quite a lot, and there's some things, particularly in DSA, that
> don't seem quite right from a phylink point of view, such as messing
> with state->interface in this function.
I don't have the expertiece to look into the DSA components of these
changes and your concerns.
Andrew, Florian, etc.?
Powered by blists - more mailing lists