diff options
Diffstat (limited to 'drivers/net/ethernet/calxeda/xgmac.c')
-rw-r--r-- | drivers/net/ethernet/calxeda/xgmac.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c index 48f52882a22b..4fc5c8ef5121 100644 --- a/drivers/net/ethernet/calxeda/xgmac.c +++ b/drivers/net/ethernet/calxeda/xgmac.c | |||
@@ -1060,13 +1060,13 @@ static int xgmac_stop(struct net_device *dev) | |||
1060 | { | 1060 | { |
1061 | struct xgmac_priv *priv = netdev_priv(dev); | 1061 | struct xgmac_priv *priv = netdev_priv(dev); |
1062 | 1062 | ||
1063 | netif_stop_queue(dev); | ||
1064 | |||
1065 | if (readl(priv->base + XGMAC_DMA_INTR_ENA)) | 1063 | if (readl(priv->base + XGMAC_DMA_INTR_ENA)) |
1066 | napi_disable(&priv->napi); | 1064 | napi_disable(&priv->napi); |
1067 | 1065 | ||
1068 | writel(0, priv->base + XGMAC_DMA_INTR_ENA); | 1066 | writel(0, priv->base + XGMAC_DMA_INTR_ENA); |
1069 | 1067 | ||
1068 | netif_tx_disable(dev); | ||
1069 | |||
1070 | /* Disable the MAC core */ | 1070 | /* Disable the MAC core */ |
1071 | xgmac_mac_disable(priv->base); | 1071 | xgmac_mac_disable(priv->base); |
1072 | 1072 | ||
@@ -1370,11 +1370,8 @@ static int xgmac_change_mtu(struct net_device *dev, int new_mtu) | |||
1370 | } | 1370 | } |
1371 | 1371 | ||
1372 | old_mtu = dev->mtu; | 1372 | old_mtu = dev->mtu; |
1373 | dev->mtu = new_mtu; | ||
1374 | 1373 | ||
1375 | /* return early if the buffer sizes will not change */ | 1374 | /* return early if the buffer sizes will not change */ |
1376 | if (old_mtu <= ETH_DATA_LEN && new_mtu <= ETH_DATA_LEN) | ||
1377 | return 0; | ||
1378 | if (old_mtu == new_mtu) | 1375 | if (old_mtu == new_mtu) |
1379 | return 0; | 1376 | return 0; |
1380 | 1377 | ||
@@ -1382,8 +1379,9 @@ static int xgmac_change_mtu(struct net_device *dev, int new_mtu) | |||
1382 | if (!netif_running(dev)) | 1379 | if (!netif_running(dev)) |
1383 | return 0; | 1380 | return 0; |
1384 | 1381 | ||
1385 | /* Bring the interface down and then back up */ | 1382 | /* Bring interface down, change mtu and bring interface back up */ |
1386 | xgmac_stop(dev); | 1383 | xgmac_stop(dev); |
1384 | dev->mtu = new_mtu; | ||
1387 | return xgmac_open(dev); | 1385 | return xgmac_open(dev); |
1388 | } | 1386 | } |
1389 | 1387 | ||