bgmac: connect to PHY and make use of PHY device
authorRafał Miłecki <zajec5@gmail.com>
Fri, 6 Dec 2013 23:53:55 +0000 (00:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Dec 2013 01:59:25 +0000 (20:59 -0500)
commit5824d2d16d39a9c57aa3bacf955fbd0c2134061f
tree0138f904b7d3f7c93cfbdab929d9d7605a80e3a4
parent2c722fe1c821a100ca87fcc36e90a9bceb497c7c
bgmac: connect to PHY and make use of PHY device

We were already registering MDIO bus, but we were not connecting bgmac
to the PHY. Add proper call and implement adjust link function to switch
MAC into requested state.
At the same time it's possible to drop our internal PHY management.
This is a "standard" PHY, so the "Generic PHY" driver works perfectly
fine with this. Don't duplicate the code.
Finally make use of phy_ethtool_[gs]set functions instead implementing
them from scratch.

This change was successfully tested on BCM5357. I was able to
autonegotiate 1000Mb/s full duplex, as well as force any of the
10/100/1000 half/full modes.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bgmac.c
drivers/net/ethernet/broadcom/bgmac.h