linux/net/dsa
Florian Fainelli 4078b76cac net: dsa: Check return value of phy_connect_direct()
We need to check the return value of phy_connect_direct() in
dsa_slave_phy_connect() otherwise we may be continuing the
initialization of a slave network device with a PHY that already
attached somewhere else and which will soon be in error because the PHY
device is in error.

The conditions for such an error to occur are that we have a port of our
switch that is not disabled, and has the same port number as a PHY
address (say both 5) that can be probed using the DSA slave MII bus. We
end-up having this slave network device find a PHY at the same address
as our port number, and we try to attach to it.

A slave network (e.g: port 0) has already attached to our PHY device,
and we try to re-attach it with a different network device, but since we
ignore the error we would end-up initializating incorrect device
references by the time the slave network interface is opened.

The code has been (re)organized several times, making it hard to provide
an exact Fixes tag, this is a bugfix nonetheless.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-23 15:43:35 -05:00
..
dsa2.c net: dsa: Ensure validity of dst->ds[0] 2017-01-10 20:18:52 -05:00
dsa_priv.h net-next: dsa: add Qualcomm tag RX/TX handler 2016-09-16 04:31:51 -04:00
dsa.c of_mdio: add helper to deregister fixed-link PHYs 2016-11-29 23:17:02 -05:00
Kconfig net-next: dsa: add Qualcomm tag RX/TX handler 2016-09-16 04:31:51 -04:00
Makefile net-next: dsa: add Qualcomm tag RX/TX handler 2016-09-16 04:31:51 -04:00
slave.c net: dsa: Check return value of phy_connect_direct() 2017-01-23 15:43:35 -05:00
tag_brcm.c net: dsa: Add a ports structure and use it in the switch structure 2016-06-04 14:29:53 -07:00
tag_dsa.c net: dsa: Add a ports structure and use it in the switch structure 2016-06-04 14:29:53 -07:00
tag_edsa.c net: dsa: Add a ports structure and use it in the switch structure 2016-06-04 14:29:53 -07:00
tag_qca.c net-next: dsa: add Qualcomm tag RX/TX handler 2016-09-16 04:31:51 -04:00
tag_trailer.c net: dsa: Add a ports structure and use it in the switch structure 2016-06-04 14:29:53 -07:00