From 532f4aee934cf26f1905fae101ac9f0ba3087f21 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Mon, 23 Jun 2008 14:36:56 +0300 Subject: ipg: run-time configurable jumbo frame support Make jumbo frame support configurable via ifconfig mtu option as suggested by Stephen Hemminger. Cc: Stephen Hemminger Tested-by: Andrew Savchenko Signed-off-by: Pekka Enberg Signed-off-by: Jeff Garzik --- drivers/net/ipg.h | 85 ------------------------------------------------------- 1 file changed, 85 deletions(-) (limited to 'drivers/net/ipg.h') diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h index c84902d845fc..e0e718ab4c2e 100644 --- a/drivers/net/ipg.h +++ b/drivers/net/ipg.h @@ -536,91 +536,6 @@ enum ipg_regs { */ #define IPG_FRAMESBETWEENTXDMACOMPLETES 0x1 -#ifdef JUMBO_FRAME -# define IPG_JUMBO true -#else -# define IPG_JUMBO false -#endif - -#ifdef JUMBO_FRAME - -# ifdef JUMBO_FRAME_SIZE_2K -# define JUMBO_FRAME_SIZE 2048 -# define __IPG_RXFRAG_SIZE 2048 -# else -# ifdef JUMBO_FRAME_SIZE_3K -# define JUMBO_FRAME_SIZE 3072 -# define __IPG_RXFRAG_SIZE 3072 -# else -# ifdef JUMBO_FRAME_SIZE_4K -# define JUMBO_FRAME_SIZE 4096 -# define __IPG_RXFRAG_SIZE 4088 -# else -# ifdef JUMBO_FRAME_SIZE_5K -# define JUMBO_FRAME_SIZE 5120 -# define __IPG_RXFRAG_SIZE 4088 -# else -# ifdef JUMBO_FRAME_SIZE_6K -# define JUMBO_FRAME_SIZE 6144 -# define __IPG_RXFRAG_SIZE 4088 -# else -# ifdef JUMBO_FRAME_SIZE_7K -# define JUMBO_FRAME_SIZE 7168 -# define __IPG_RXFRAG_SIZE 4088 -# else -# ifdef JUMBO_FRAME_SIZE_8K -# define JUMBO_FRAME_SIZE 8192 -# define __IPG_RXFRAG_SIZE 4088 -# else -# ifdef JUMBO_FRAME_SIZE_9K -# define JUMBO_FRAME_SIZE 9216 -# define __IPG_RXFRAG_SIZE 4088 -# else -# ifdef JUMBO_FRAME_SIZE_10K -# define JUMBO_FRAME_SIZE 10240 -# define __IPG_RXFRAG_SIZE 4088 -# else -# define JUMBO_FRAME_SIZE 4096 -# endif -# endif -# endif -# endif -# endif -# endif -# endif -# endif -# endif -#endif - -/* Size of allocated received buffers. Nominally 0x0600. - * Define larger if expecting jumbo frames. - */ -#ifdef JUMBO_FRAME -/* IPG_TXFRAG_SIZE must <= 0x2b00, or TX will crash */ -#define IPG_TXFRAG_SIZE JUMBO_FRAME_SIZE -#else -#define IPG_TXFRAG_SIZE 0 /* use default MTU */ -#endif - -/* Size of allocated received buffers. Nominally 0x0600. - * Define larger if expecting jumbo frames. - */ -#ifdef JUMBO_FRAME -/* 4088 = 4096 - 8 */ -#define IPG_RXFRAG_SIZE __IPG_RXFRAG_SIZE -#define IPG_RXSUPPORT_SIZE IPG_MAX_RXFRAME_SIZE -#else -#define IPG_RXFRAG_SIZE 0x0600 -#define IPG_RXSUPPORT_SIZE IPG_RXFRAG_SIZE -#endif - -/* IPG_MAX_RXFRAME_SIZE <= IPG_RXFRAG_SIZE */ -#ifdef JUMBO_FRAME -#define IPG_MAX_RXFRAME_SIZE JUMBO_FRAME_SIZE -#else -#define IPG_MAX_RXFRAME_SIZE 0x0600 -#endif - #define IPG_RFDLIST_LENGTH 0x100 /* Maximum number of RFDs to process per interrupt. -- cgit