aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-08-24 13:04:38 -0400
committerBen Hutchings <bhutchings@solarflare.com>2012-08-24 15:10:24 -0400
commit8f8b3d518999fd1c342310910aa1e49112c86d05 (patch)
tree7024fcb7301339f9c41100717e8bc982aa0ed790
parentadeb15aa1ce3413d461ec0958a979e9d64cd764c (diff)
sfc: Fix the initial device operstate
Following commit 8f4cccb ('net: Set device operstate at registration time') it is now correct and preferable to set the carrier off before registering a device. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
-rw-r--r--drivers/net/ethernet/sfc/efx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 92f002029481..a606db43c5ba 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -2120,6 +2120,9 @@ static int efx_register_netdev(struct efx_nic *efx)
2120 goto fail_locked; 2120 goto fail_locked;
2121 efx_update_name(efx); 2121 efx_update_name(efx);
2122 2122
2123 /* Always start with carrier off; PHY events will detect the link */
2124 netif_carrier_off(net_dev);
2125
2123 rc = register_netdevice(net_dev); 2126 rc = register_netdevice(net_dev);
2124 if (rc) 2127 if (rc)
2125 goto fail_locked; 2128 goto fail_locked;
@@ -2130,9 +2133,6 @@ static int efx_register_netdev(struct efx_nic *efx)
2130 efx_init_tx_queue_core_txq(tx_queue); 2133 efx_init_tx_queue_core_txq(tx_queue);
2131 } 2134 }
2132 2135
2133 /* Always start with carrier off; PHY events will detect the link */
2134 netif_carrier_off(net_dev);
2135
2136 rtnl_unlock(); 2136 rtnl_unlock();
2137 2137
2138 rc = device_create_file(&efx->pci_dev->dev, &dev_attr_phy_type); 2138 rc = device_create_file(&efx->pci_dev->dev, &dev_attr_phy_type);