net: dsa: mv88e6xxx: Drop serdes methods for 88E6172
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 16 lines · Russell King (Oracle)
Quoted 5 lines · Marek Behún
Drop serdes methods for 88E6172. This switch from the 6352 family does not have serdes. Until commit
85764555442f("net: dsa: mv88e6xxx:
convert 88e6352 tophylink_pcs") these methods were checking for serdes presence by looking at port's cmode, but in that commit the check was dropped, so now the nonexistent serdes registers are being accessed.This attributes blame incorrectly, and shows a lack of understanding. No, one can *not* discover presence of the serdes "by looking at the port's cmode" - that is total rubbish.
The MV88E6352 family supports ports that can auto-select between the integrated baseT PHY and the serdes depending on which has link. The port CMODE tells us *nothing* about whether the port supports serdes or not.
Quoted 4 lines
Please fix your description not to spread misinformation, and incorrectly indirectly blame others for stuff that is not appropriate.
Thanks.
Hi,
sorry about this.
It seems that the 6352 family was always written with serdes support for the whole family, 6172 included, even before the switch operations structure was introduced.
But it really did check whether it should touch serdes registers by checking cmode:
in commit 85764555442f~1 the function mv88e6352_serdes_get_lane() checks the port's cmode:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/dsa/mv88e6xxx/serdes.c?id=4aabe35c385ce6c28613ab56b334b4a9521d62b7#n260
then in chip.c this is used in
mv88e6xxx_serdes_pcs_get_state
mv88e6xxx_serdes_pcs_config
mv88e6xxx_serdes_pcs_an_restart
mv88e6xxx_serdes_pcs_link_up
mv88e6xxx_serdes_irq_thread_fn
mv88e6xxx_serdes_power
and even before, in commit 10fa5bfcd697, it was decided by looking at cmode whether serdes should be powered on
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/dsa/mv88e6xxx/chip.c?id=10fa5bfcd697#n1885
I propose dropping the Fixes tag and having just this in the commit message:
Drop serdes methods for 88E6172. This switch from the 6352 family does not have serdes.
What do you think?
Marek