linux-stable/drivers/net/ethernet/broadcom/genet
Florian Fainelli 6ac9de5f65 net: bcmgenet: Register link_update callback for all MoCA PHYs
Commit 8d88c6ebb3 ("net: bcmgenet: enable MoCA link state change
detection") added a fixed PHY link_update callback for MoCA PHYs when
registered using platform_data exclusively, this change is also
applicable to systems using Device Tree as their primary configuration
interface.

In order for this to work, move the link_update assignment into
bcmgenet_moca_phy_setup() where we know for sure that we are running on
a MoCA GENET instance, and do not override phydev->link since this is:

- properly taken care of by the PHY library by getting the link UP/DOWN
  interrupts
- this now runs everytime we call bcmgenet_open(), so we need to
  preserve whatever we detected before we went administratively DOWN and
  then UP
- we need to make sure that MoCA PHYs start with a link DOWN during
  probe in order to force a link transition to occur

To avoid a forward declaration, move bcmgenet_fixed_phy_link_update()
above its caller.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-07-26 20:53:56 -07:00
..
bcmgenet.c net: bcmgenet: Remove checks on clock handles 2015-07-26 17:21:56 -07:00
bcmgenet.h net: bcmgenet: Remove init parameter from bcmgenet_mii_config 2015-07-20 20:48:14 -07:00
bcmgenet_wol.c net: bcmgenet: properly disable password matching 2015-03-05 21:15:21 -05:00
bcmmii.c net: bcmgenet: Register link_update callback for all MoCA PHYs 2015-07-26 20:53:56 -07:00
Makefile net: bcmgenet: add Wake-on-LAN support code 2014-07-21 16:04:31 -07:00