net: bcmgenet: improve bcmgenet_mii_setup()
authorPetri Gynther <pgynther@google.com>
Fri, 3 Oct 2014 19:25:01 +0000 (12:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Oct 2014 04:18:09 +0000 (00:18 -0400)
commit5ad6e6c50899621030a9b10ddcb2fcd349cb5965
tree0353820141d9c811eb203c48ec44619b74a5c052
parentf13909cdab3ad0fda7be8c42f0930fbf7200ffa4
net: bcmgenet: improve bcmgenet_mii_setup()

bcmgenet_mii_setup() is called from the PHY state machine every 1-2 seconds
when the PHYs are in PHY_POLL mode.

Improve bcmgenet_mii_setup() so that it touches the MAC registers only when
the link is up and there was a change to link, speed, duplex, or pause status.

Signed-off-by: Petri Gynther <pgynther@google.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/ethernet/broadcom/genet/bcmgenet.h
drivers/net/ethernet/broadcom/genet/bcmmii.c