|
@@ -1963,8 +1963,15 @@ static int e1000_set_coalesce(struct net_device *netdev,
|
|
static int e1000_nway_reset(struct net_device *netdev)
|
|
static int e1000_nway_reset(struct net_device *netdev)
|
|
{
|
|
{
|
|
struct e1000_adapter *adapter = netdev_priv(netdev);
|
|
struct e1000_adapter *adapter = netdev_priv(netdev);
|
|
- if (netif_running(netdev))
|
|
|
|
- e1000e_reinit_locked(adapter);
|
|
|
|
|
|
+
|
|
|
|
+ if (!netif_running(netdev))
|
|
|
|
+ return -EAGAIN;
|
|
|
|
+
|
|
|
|
+ if (!adapter->hw.mac.autoneg)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
|
|
+ e1000e_reinit_locked(adapter);
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|