diff options
author | Malli Chilakala <mallikarjuna.chilakala@intel.com> | 2005-04-28 22:44:25 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-12 20:48:55 -0400 |
commit | 1125ecbc0a89db07bb4eb1ba892a23367c3bdeb5 (patch) | |
tree | 5302b4334c8f1f9ed6984231101e97e761b8b903 /drivers/net | |
parent | 0e6ef3e02b6f07e37ba1c1abc059f8bee4e0847f (diff) |
[PATCH] e1000:Adjust flow control watermarks for Jumbo Frames
Adjust flow control watermarks for Jumbo Frames
Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
diff -up net-drivers-2.6/drivers/net/e1000/e1000_main.c net-drivers-2.6/drivers/net/e1000.new/e1000_main.c
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 13bde9090537..24d96c02b509 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -409,7 +409,10 @@ e1000_down(struct e1000_adapter *adapter) | |||
409 | void | 409 | void |
410 | e1000_reset(struct e1000_adapter *adapter) | 410 | e1000_reset(struct e1000_adapter *adapter) |
411 | { | 411 | { |
412 | struct net_device *netdev = adapter->netdev; | ||
412 | uint32_t pba, manc; | 413 | uint32_t pba, manc; |
414 | uint16_t fc_high_water_mark = E1000_FC_HIGH_DIFF; | ||
415 | uint16_t fc_low_water_mark = E1000_FC_LOW_DIFF; | ||
413 | 416 | ||
414 | /* Repartition Pba for greater than 9k mtu | 417 | /* Repartition Pba for greater than 9k mtu |
415 | * To take effect CTRL.RST is required. | 418 | * To take effect CTRL.RST is required. |
@@ -428,6 +431,16 @@ e1000_reset(struct e1000_adapter *adapter) | |||
428 | break; | 431 | break; |
429 | } | 432 | } |
430 | 433 | ||
434 | if((adapter->hw.mac_type != e1000_82573) && | ||
435 | (adapter->rx_buffer_len > E1000_RXBUFFER_8192)) { | ||
436 | pba -= 8; /* allocate more FIFO for Tx */ | ||
437 | /* send an XOFF when there is enough space in the | ||
438 | * Rx FIFO to hold one extra full size Rx packet | ||
439 | */ | ||
440 | fc_high_water_mark = netdev->mtu + ENET_HEADER_SIZE + | ||
441 | ETHERNET_FCS_SIZE + 1; | ||
442 | fc_low_water_mark = fc_high_water_mark + 8; | ||
443 | } | ||
431 | 444 | ||
432 | 445 | ||
433 | if(adapter->hw.mac_type == e1000_82547) { | 446 | if(adapter->hw.mac_type == e1000_82547) { |
@@ -442,9 +455,9 @@ e1000_reset(struct e1000_adapter *adapter) | |||
442 | 455 | ||
443 | /* flow control settings */ | 456 | /* flow control settings */ |
444 | adapter->hw.fc_high_water = (pba << E1000_PBA_BYTES_SHIFT) - | 457 | adapter->hw.fc_high_water = (pba << E1000_PBA_BYTES_SHIFT) - |
445 | E1000_FC_HIGH_DIFF; | 458 | fc_high_water_mark; |
446 | adapter->hw.fc_low_water = (pba << E1000_PBA_BYTES_SHIFT) - | 459 | adapter->hw.fc_low_water = (pba << E1000_PBA_BYTES_SHIFT) - |
447 | E1000_FC_LOW_DIFF; | 460 | fc_low_water_mark; |
448 | adapter->hw.fc_pause_time = E1000_FC_PAUSE_TIME; | 461 | adapter->hw.fc_pause_time = E1000_FC_PAUSE_TIME; |
449 | adapter->hw.fc_send_xon = 1; | 462 | adapter->hw.fc_send_xon = 1; |
450 | adapter->hw.fc = adapter->hw.original_fc; | 463 | adapter->hw.fc = adapter->hw.original_fc; |