]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6f6aa2dfdfa4a1a3393f6262c6faa2037e303e1d
tree0138f904b7d3f7c93cfbdab929d9d7605a80e3a4
parenta173fed1f82ab93cac284be4de3e12f2043f10d1
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