net: bcmgenet: Register link_update callback for all MoCA PHYs
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 23 Jul 2015 00:29:53 +0000 (17:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2015 03:53:56 +0000 (20:53 -0700)
commit6ac9de5f656352b24ab2cb3e925f078c8c809a19
tree6af5d79ba80791b17431589376dc3fe97451ea54
parent7d5d3075b5910cff7b33a68d3b065566fece4ba1
net: bcmgenet: Register link_update callback for all MoCA PHYs

Commit 8d88c6ebb34c ("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>
drivers/net/ethernet/broadcom/genet/bcmmii.c
This page took 0.026962 seconds and 5 git commands to generate.