linux/drivers/net/ethernet/broadcom/genet
Florian Fainelli c624f89121 net: bcmgenet: Determine PHY type before scanning MDIO bus
Our internal GPHY might be powered off before we attempt scanning the
MDIO bus and bind a driver to it. The way we are currently determining
whether a PHY is internal or not is done *after* we have successfully
matched its driver. If the PHY is powered down, it will not respond to
the MDIO bus, so we will not be able to bind a driver to it.

Our Device Tree for GENET interfaces specifies a "phy-mode" value:
"internal" which tells if this internal uses an internal PHY or not.

If of_get_phy_mode() fails to parse the 'phy-mode' property, do an
additional manual lookup, and if we find "internal" set the
corresponding internal variable accordingly.

Replace all uses of phy_is_internal() with a check against
priv->internal_phy to avoid having to rely on whether or not
priv->phydev is set correctly.

Fixes: 1c1008c793 ("net: bcmgenet: add main driver file")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-07-20 20:48:14 -07:00
..
Makefile net: bcmgenet: add Wake-on-LAN support code 2014-07-21 16:04:31 -07:00
bcmgenet.c net: bcmgenet: Determine PHY type before scanning MDIO bus 2015-07-20 20:48:14 -07:00
bcmgenet.h net: bcmgenet: Determine PHY type before scanning MDIO bus 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: Determine PHY type before scanning MDIO bus 2015-07-20 20:48:14 -07:00