|
@@ -1099,9 +1099,6 @@ static int emac_change_mtu(struct net_device *ndev, int new_mtu)
|
|
struct emac_instance *dev = netdev_priv(ndev);
|
|
struct emac_instance *dev = netdev_priv(ndev);
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
|
- if (new_mtu < EMAC_MIN_MTU || new_mtu > dev->max_mtu)
|
|
|
|
- return -EINVAL;
|
|
|
|
-
|
|
|
|
DBG(dev, "change_mtu(%d)" NL, new_mtu);
|
|
DBG(dev, "change_mtu(%d)" NL, new_mtu);
|
|
|
|
|
|
if (netif_running(ndev)) {
|
|
if (netif_running(ndev)) {
|
|
@@ -2564,7 +2561,7 @@ static int emac_init_config(struct emac_instance *dev)
|
|
if (emac_read_uint_prop(np, "cell-index", &dev->cell_index, 1))
|
|
if (emac_read_uint_prop(np, "cell-index", &dev->cell_index, 1))
|
|
return -ENXIO;
|
|
return -ENXIO;
|
|
if (emac_read_uint_prop(np, "max-frame-size", &dev->max_mtu, 0))
|
|
if (emac_read_uint_prop(np, "max-frame-size", &dev->max_mtu, 0))
|
|
- dev->max_mtu = 1500;
|
|
|
|
|
|
+ dev->max_mtu = ETH_DATA_LEN;
|
|
if (emac_read_uint_prop(np, "rx-fifo-size", &dev->rx_fifo_size, 0))
|
|
if (emac_read_uint_prop(np, "rx-fifo-size", &dev->rx_fifo_size, 0))
|
|
dev->rx_fifo_size = 2048;
|
|
dev->rx_fifo_size = 2048;
|
|
if (emac_read_uint_prop(np, "tx-fifo-size", &dev->tx_fifo_size, 0))
|
|
if (emac_read_uint_prop(np, "tx-fifo-size", &dev->tx_fifo_size, 0))
|
|
@@ -2890,6 +2887,10 @@ static int emac_probe(struct platform_device *ofdev)
|
|
ndev->netdev_ops = &emac_netdev_ops;
|
|
ndev->netdev_ops = &emac_netdev_ops;
|
|
ndev->ethtool_ops = &emac_ethtool_ops;
|
|
ndev->ethtool_ops = &emac_ethtool_ops;
|
|
|
|
|
|
|
|
+ /* MTU range: 46 - 1500 or whatever is in OF */
|
|
|
|
+ ndev->min_mtu = EMAC_MIN_MTU;
|
|
|
|
+ ndev->max_mtu = dev->max_mtu;
|
|
|
|
+
|
|
netif_carrier_off(ndev);
|
|
netif_carrier_off(ndev);
|
|
|
|
|
|
err = register_netdev(ndev);
|
|
err = register_netdev(ndev);
|