Thread (5 messages) 5 messages, 4 authors, 2020-02-29

Re: [PATCH net] net: dsa: fix phylink_start()/phylink_stop() calls

From: Andrew Lunn <andrew@lunn.ch>
Date: 2020-02-29 17:06:53

Hi Russell
quoted
The current code in dsa_slave_open() first enables the port, then
calls phylink_start(). So maybe we should keep the ordering the same?
However, dsa_port_setup() does it in the reverse order, so it was a
bit of guess work which is right.  So, if the port needs to be enabled
first, then the dsa_port_setup() path for DSA and CPU ports is wrong.

It's not clear what dsa_port_enable() actually does, and should a port
be enabled before its interface mode and link parameters have been
set?
Agreed, it is not clearly defined. port_enable()/port_disable() are
mostly used for power saving. If a port is not used, it can be turned
off.

Having phylink for DSA and CPU ports is a new thing. Slaves have
always had phylib/phylink. So i think it would be safest to follow the
order used for slave interfaces, enable the port first, then start
phylink.

We should probably also change the order for DSA and CPU ports so it
is consistent.

   Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help