Commit 83042955 authored by Pekka Enberg's avatar Pekka Enberg Committed by Jeff Garzik

ipg: remove jumbo frame #ifdef from mtu

Remove JUMBO_FRAME #ifdef from dev->mtu setting in ipg_nic_open() so that we
can make IPG_TXFRAG_SIZE configurable.
Tested-by: default avatarAndrew Savchenko <Bircoph@list.ru>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 024f4d88
...@@ -1807,9 +1807,9 @@ static int ipg_nic_open(struct net_device *dev) ...@@ -1807,9 +1807,9 @@ static int ipg_nic_open(struct net_device *dev)
sp->jumbo.found_start = 0; sp->jumbo.found_start = 0;
sp->jumbo.current_size = 0; sp->jumbo.current_size = 0;
sp->jumbo.skb = NULL; sp->jumbo.skb = NULL;
#ifdef JUMBO_FRAME
if (IPG_TXFRAG_SIZE)
dev->mtu = IPG_TXFRAG_SIZE; dev->mtu = IPG_TXFRAG_SIZE;
#endif
/* Enable transmit and receive operation of the IPG. */ /* Enable transmit and receive operation of the IPG. */
ipg_w32((ipg_r32(MAC_CTRL) | IPG_MC_RX_ENABLE | IPG_MC_TX_ENABLE) & ipg_w32((ipg_r32(MAC_CTRL) | IPG_MC_RX_ENABLE | IPG_MC_TX_ENABLE) &
......
...@@ -598,6 +598,8 @@ enum ipg_regs { ...@@ -598,6 +598,8 @@ enum ipg_regs {
#ifdef JUMBO_FRAME #ifdef JUMBO_FRAME
/* IPG_TXFRAG_SIZE must <= 0x2b00, or TX will crash */ /* IPG_TXFRAG_SIZE must <= 0x2b00, or TX will crash */
#define IPG_TXFRAG_SIZE JUMBO_FRAME_SIZE #define IPG_TXFRAG_SIZE JUMBO_FRAME_SIZE
#else
#define IPG_TXFRAG_SIZE 0 /* use default MTU */
#endif #endif
/* Size of allocated received buffers. Nominally 0x0600. /* Size of allocated received buffers. Nominally 0x0600.
......
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