aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/efx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sfc/efx.c')
-rw-r--r--drivers/net/sfc/efx.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index 7269a426051c..d3e240b736c7 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -1300,10 +1300,16 @@ out_requeue:
1300static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd) 1300static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd)
1301{ 1301{
1302 struct efx_nic *efx = netdev_priv(net_dev); 1302 struct efx_nic *efx = netdev_priv(net_dev);
1303 struct mii_ioctl_data *data = if_mii(ifr);
1303 1304
1304 EFX_ASSERT_RESET_SERIALISED(efx); 1305 EFX_ASSERT_RESET_SERIALISED(efx);
1305 1306
1306 return generic_mii_ioctl(&efx->mii, if_mii(ifr), cmd, NULL); 1307 /* Convert phy_id from older PRTAD/DEVAD format */
1308 if ((cmd == SIOCGMIIREG || cmd == SIOCSMIIREG) &&
1309 (data->phy_id & 0xfc00) == 0x0400)
1310 data->phy_id ^= MDIO_PHY_ID_C45 | 0x0400;
1311
1312 return mdio_mii_ioctl(&efx->mdio, data, cmd);
1307} 1313}
1308 1314
1309/************************************************************************** 1315/**************************************************************************
@@ -1945,7 +1951,7 @@ static int efx_init_struct(struct efx_nic *efx, struct efx_nic_type *type,
1945 mutex_init(&efx->mac_lock); 1951 mutex_init(&efx->mac_lock);
1946 efx->mac_op = &efx_dummy_mac_operations; 1952 efx->mac_op = &efx_dummy_mac_operations;
1947 efx->phy_op = &efx_dummy_phy_operations; 1953 efx->phy_op = &efx_dummy_phy_operations;
1948 efx->mii.dev = net_dev; 1954 efx->mdio.dev = net_dev;
1949 INIT_WORK(&efx->phy_work, efx_phy_work); 1955 INIT_WORK(&efx->phy_work, efx_phy_work);
1950 INIT_WORK(&efx->mac_work, efx_mac_work); 1956 INIT_WORK(&efx->mac_work, efx_mac_work);
1951 atomic_set(&efx->netif_stop_count, 1); 1957 atomic_set(&efx->netif_stop_count, 1);