All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] emac: fix jumbo frame support
@ 2005-02-09  5:34 Matt Porter
  0 siblings, 0 replies; only message in thread
From: Matt Porter @ 2005-02-09  5:34 UTC (permalink / raw)
  To: jgarzik; +Cc: netdev, linuxppc-embedded

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: Matt Porter <mporter@kernel.crashing.org>

===== drivers/net/ibm_emac/ibm_emac_core.c 1.7 vs edited =====
--- 1.7/drivers/net/ibm_emac/ibm_emac_core.c	2004-12-07 10:06:23 -07:00
+++ edited/drivers/net/ibm_emac/ibm_emac_core.c	2005-02-08 22:25:39 -07:00
@@ -912,7 +912,6 @@
 		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 @@
 	/* 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
===== drivers/net/ibm_emac/ibm_emac_core.h 1.2 vs edited =====
--- 1.2/drivers/net/ibm_emac/ibm_emac_core.h	2004-08-05 07:26:55 -07:00
+++ edited/drivers/net/ibm_emac/ibm_emac_core.h	2005-02-08 22:24:52 -07:00
@@ -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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-02-09  5:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-09  5:34 [PATCH] emac: fix jumbo frame support Matt Porter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.