]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "net: dsa: bcm_sf2: Defer port enabling to calling port_enable"
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 28 Sep 2017 18:19:06 +0000 (11:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Oct 2017 03:01:29 +0000 (04:01 +0100)
commit0e9e2fac12ef5ab6103d87cec5884676911f22ac
tree524c7150e4b645ac4cb7eac62e0ea55d825e7742
parentfa39ea404ce3e45117aa2214e92cd02ea10ce381
Revert "net: dsa: bcm_sf2: Defer port enabling to calling port_enable"

This reverts commit f13716b303e1 ("net: dsa: bcm_sf2: Defer port
enabling to calling port_enable") because this now makes an unbind
followed by a bind to fail connecting to the ingrated PHY.

What this patch missed is that we need the PHY to be enabled with
bcm_sf2_gphy_enable_set() before probing it on the MDIO bus. This is
correctly done in the ops->setup() function, but by the time
ops->port_enable() runs, this is too late. Upon unbind we would power
down the PHY, and so when we would bind again, the PHY would be left
powered off.

Fixes: f13716b303e1 ("net: dsa: bcm_sf2: Defer port enabling to calling port_enable")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/bcm_sf2.c