diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 21 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_param.c | 2 |
2 files changed, 8 insertions, 15 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 4016264a7919..cefc7cc092a7 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -504,10 +504,8 @@ e1000_down(struct e1000_adapter *adapter) | |||
504 | void | 504 | void |
505 | e1000_reset(struct e1000_adapter *adapter) | 505 | e1000_reset(struct e1000_adapter *adapter) |
506 | { | 506 | { |
507 | struct net_device *netdev = adapter->netdev; | ||
508 | uint32_t pba, manc; | 507 | uint32_t pba, manc; |
509 | uint16_t fc_high_water_mark = E1000_FC_HIGH_DIFF; | 508 | uint16_t fc_high_water_mark = E1000_FC_HIGH_DIFF; |
510 | uint16_t fc_low_water_mark = E1000_FC_LOW_DIFF; | ||
511 | 509 | ||
512 | /* Repartition Pba for greater than 9k mtu | 510 | /* Repartition Pba for greater than 9k mtu |
513 | * To take effect CTRL.RST is required. | 511 | * To take effect CTRL.RST is required. |
@@ -531,15 +529,8 @@ e1000_reset(struct e1000_adapter *adapter) | |||
531 | } | 529 | } |
532 | 530 | ||
533 | if((adapter->hw.mac_type != e1000_82573) && | 531 | if((adapter->hw.mac_type != e1000_82573) && |
534 | (adapter->netdev->mtu > E1000_RXBUFFER_8192)) { | 532 | (adapter->netdev->mtu > E1000_RXBUFFER_8192)) |
535 | pba -= 8; /* allocate more FIFO for Tx */ | 533 | pba -= 8; /* allocate more FIFO for Tx */ |
536 | /* send an XOFF when there is enough space in the | ||
537 | * Rx FIFO to hold one extra full size Rx packet | ||
538 | */ | ||
539 | fc_high_water_mark = netdev->mtu + ENET_HEADER_SIZE + | ||
540 | ETHERNET_FCS_SIZE + 1; | ||
541 | fc_low_water_mark = fc_high_water_mark + 8; | ||
542 | } | ||
543 | 534 | ||
544 | 535 | ||
545 | if(adapter->hw.mac_type == e1000_82547) { | 536 | if(adapter->hw.mac_type == e1000_82547) { |
@@ -553,10 +544,12 @@ e1000_reset(struct e1000_adapter *adapter) | |||
553 | E1000_WRITE_REG(&adapter->hw, PBA, pba); | 544 | E1000_WRITE_REG(&adapter->hw, PBA, pba); |
554 | 545 | ||
555 | /* flow control settings */ | 546 | /* flow control settings */ |
556 | adapter->hw.fc_high_water = (pba << E1000_PBA_BYTES_SHIFT) - | 547 | /* Set the FC high water mark to 90% of the FIFO size. |
557 | fc_high_water_mark; | 548 | * Required to clear last 3 LSB */ |
558 | adapter->hw.fc_low_water = (pba << E1000_PBA_BYTES_SHIFT) - | 549 | fc_high_water_mark = ((pba * 9216)/10) & 0xFFF8; |
559 | fc_low_water_mark; | 550 | |
551 | adapter->hw.fc_high_water = fc_high_water_mark; | ||
552 | adapter->hw.fc_low_water = fc_high_water_mark - 8; | ||
560 | adapter->hw.fc_pause_time = E1000_FC_PAUSE_TIME; | 553 | adapter->hw.fc_pause_time = E1000_FC_PAUSE_TIME; |
561 | adapter->hw.fc_send_xon = 1; | 554 | adapter->hw.fc_send_xon = 1; |
562 | adapter->hw.fc = adapter->hw.original_fc; | 555 | adapter->hw.fc = adapter->hw.original_fc; |
diff --git a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c index b0be7d69af34..133a76b71b9c 100644 --- a/drivers/net/e1000/e1000_param.c +++ b/drivers/net/e1000/e1000_param.c | |||
@@ -388,7 +388,7 @@ e1000_check_options(struct e1000_adapter *adapter) | |||
388 | e1000_validate_option(&fc, &opt, adapter); | 388 | e1000_validate_option(&fc, &opt, adapter); |
389 | adapter->hw.fc = adapter->hw.original_fc = fc; | 389 | adapter->hw.fc = adapter->hw.original_fc = fc; |
390 | } else { | 390 | } else { |
391 | adapter->hw.fc = opt.def; | 391 | adapter->hw.fc = adapter->hw.original_fc = opt.def; |
392 | } | 392 | } |
393 | } | 393 | } |
394 | { /* Transmit Interrupt Delay */ | 394 | { /* Transmit Interrupt Delay */ |