diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2006-01-12 19:51:05 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 07:44:51 -0500 |
commit | 0fadb0597d240d4ed279042cab632d567510a1a3 (patch) | |
tree | 83786788f8bf5ef24b3b2cc871b84030c4d59fdf /drivers/net/e1000/e1000_main.c | |
parent | 47028635d17c7b9c7ffc67499be5fed579bdfe72 (diff) |
[PATCH] e1000: Fix collision distance
Fixed the collision distance for 82543 controllers and newer.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index d2e77ee103bb..36b04d42252f 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -1342,6 +1342,7 @@ e1000_configure_tx(struct e1000_adapter *adapter) | |||
1342 | uint64_t tdba; | 1342 | uint64_t tdba; |
1343 | struct e1000_hw *hw = &adapter->hw; | 1343 | struct e1000_hw *hw = &adapter->hw; |
1344 | uint32_t tdlen, tctl, tipg, tarc; | 1344 | uint32_t tdlen, tctl, tipg, tarc; |
1345 | uint32_t ipgr1, ipgr2; | ||
1345 | 1346 | ||
1346 | /* Setup the HW Tx Head and Tail descriptor pointers */ | 1347 | /* Setup the HW Tx Head and Tail descriptor pointers */ |
1347 | 1348 | ||
@@ -1375,22 +1376,26 @@ e1000_configure_tx(struct e1000_adapter *adapter) | |||
1375 | 1376 | ||
1376 | /* Set the default values for the Tx Inter Packet Gap timer */ | 1377 | /* Set the default values for the Tx Inter Packet Gap timer */ |
1377 | 1378 | ||
1379 | if (hw->media_type == e1000_media_type_fiber || | ||
1380 | hw->media_type == e1000_media_type_internal_serdes) | ||
1381 | tipg = DEFAULT_82543_TIPG_IPGT_FIBER; | ||
1382 | else | ||
1383 | tipg = DEFAULT_82543_TIPG_IPGT_COPPER; | ||
1384 | |||
1378 | switch (hw->mac_type) { | 1385 | switch (hw->mac_type) { |
1379 | case e1000_82542_rev2_0: | 1386 | case e1000_82542_rev2_0: |
1380 | case e1000_82542_rev2_1: | 1387 | case e1000_82542_rev2_1: |
1381 | tipg = DEFAULT_82542_TIPG_IPGT; | 1388 | tipg = DEFAULT_82542_TIPG_IPGT; |
1382 | tipg |= DEFAULT_82542_TIPG_IPGR1 << E1000_TIPG_IPGR1_SHIFT; | 1389 | ipgr1 = DEFAULT_82542_TIPG_IPGR1; |
1383 | tipg |= DEFAULT_82542_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT; | 1390 | ipgr2 = DEFAULT_82542_TIPG_IPGR2; |
1384 | break; | 1391 | break; |
1385 | default: | 1392 | default: |
1386 | if (hw->media_type == e1000_media_type_fiber || | 1393 | ipgr1 = DEFAULT_82543_TIPG_IPGR1; |
1387 | hw->media_type == e1000_media_type_internal_serdes) | 1394 | ipgr2 = DEFAULT_82543_TIPG_IPGR2; |
1388 | tipg = DEFAULT_82543_TIPG_IPGT_FIBER; | 1395 | break; |
1389 | else | ||
1390 | tipg = DEFAULT_82543_TIPG_IPGT_COPPER; | ||
1391 | tipg |= DEFAULT_82543_TIPG_IPGR1 << E1000_TIPG_IPGR1_SHIFT; | ||
1392 | tipg |= DEFAULT_82543_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT; | ||
1393 | } | 1396 | } |
1397 | tipg |= ipgr1 << E1000_TIPG_IPGR1_SHIFT; | ||
1398 | tipg |= ipgr2 << E1000_TIPG_IPGR2_SHIFT; | ||
1394 | E1000_WRITE_REG(hw, TIPG, tipg); | 1399 | E1000_WRITE_REG(hw, TIPG, tipg); |
1395 | 1400 | ||
1396 | /* Set the Tx Interrupt Delay register */ | 1401 | /* Set the Tx Interrupt Delay register */ |
@@ -1600,7 +1605,10 @@ e1000_setup_rctl(struct e1000_adapter *adapter) | |||
1600 | E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF | | 1605 | E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF | |
1601 | (adapter->hw.mc_filter_type << E1000_RCTL_MO_SHIFT); | 1606 | (adapter->hw.mc_filter_type << E1000_RCTL_MO_SHIFT); |
1602 | 1607 | ||
1603 | if(adapter->hw.tbi_compatibility_on == 1) | 1608 | if (adapter->hw.mac_type > e1000_82543) |
1609 | rctl |= E1000_RCTL_SECRC; | ||
1610 | |||
1611 | if (adapter->hw.tbi_compatibility_on == 1) | ||
1604 | rctl |= E1000_RCTL_SBP; | 1612 | rctl |= E1000_RCTL_SBP; |
1605 | else | 1613 | else |
1606 | rctl &= ~E1000_RCTL_SBP; | 1614 | rctl &= ~E1000_RCTL_SBP; |