]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: use dev->phydev instead of priv->phydev
authorDoug Berger <opendmb@gmail.com>
Wed, 25 Oct 2017 22:04:19 +0000 (15:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Oct 2017 01:14:54 +0000 (10:14 +0900)
commit98ccb112def43de1b70825d77ba385c090c246c0
tree06ea31e45584d5f2698f1ee1817854268c59b9f1
parentc95f729c34d581163992879e07fbc7dd4510021b
net: bcmgenet: use dev->phydev instead of priv->phydev

Now that the software reset of the PHY has been removed it is no
longer necessary to retain a private pointer to the phydev for
use when the PHY is detached (which isn't generally safe anyway).

The driver now uses the phydev member attached to the net_device.

For ethtool commands that have a PHY component, an explicit check
is made to prevent accessing an invalid phydev pointer when one
is not attached (e.g. interface is down).

Signed-off-by: Doug Berger <opendmb@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