Commit b07d2bff authored by Matt Porter's avatar Matt Porter Committed by Jeff Garzik

[PATCH] emac: fix jumbo frame support

Fixes a bug in RX buffer allocation so that jumbo size skbs are
allocated when the MTU size is changed. Also removes the deprecated
restore_flags() call.  Please apply.
Signed-off-by: default avatarMatt Porter <mporter@kernel.crashing.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 5c5759bc
......@@ -912,7 +912,6 @@ static int emac_start_xmit(struct sk_buff *skb, struct net_device *dev)
PKT_DEBUG(("emac_start_xmit() stopping queue\n"));
netif_stop_queue(dev);
spin_unlock_irqrestore(&fep->lock, flags);
restore_flags(flags);
return -EBUSY;
}
......@@ -1281,7 +1280,7 @@ static void emac_init_rings(struct net_device *dev)
/* Format the receive descriptor ring. */
ep->rx_slot = 0;
/* Default is MTU=1500 + Ethernet overhead */
ep->rx_buffer_size = ENET_DEF_BUF_SIZE;
ep->rx_buffer_size = dev->mtu + ENET_HEADER_SIZE + ENET_FCS_SIZE;
emac_rx_fill(dev, 0);
if (ep->rx_slot != 0) {
printk(KERN_ERR
......
......@@ -77,8 +77,6 @@
#define ENET_HEADER_SIZE 14
#define ENET_FCS_SIZE 4
#define ENET_DEF_MTU_SIZE 1500
#define ENET_DEF_BUF_SIZE (ENET_DEF_MTU_SIZE + ENET_HEADER_SIZE + ENET_FCS_SIZE)
#define EMAC_MIN_FRAME 64
#define EMAC_MAX_FRAME 9018
#define EMAC_MIN_MTU (EMAC_MIN_FRAME - ENET_HEADER_SIZE - ENET_FCS_SIZE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment