Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41477
b: refs/heads/master
c: 90fb513
h: refs/heads/master
i:
  41475: 6652bef
v: v3
  • Loading branch information
Auke Kok authored and Jeff Garzik committed Dec 2, 2006
1 parent c85842e commit b7cd055
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 69 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a362bf57aa12835e4fa6af6960e5135b5626bc5b
refs/heads/master: 90fb51358a264f2f7e0cabdca6fc229bbc40cd91
27 changes: 14 additions & 13 deletions trunk/drivers/net/e1000/e1000_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)

if (hw->autoneg == 1) {
ecmd->advertising |= ADVERTISED_Autoneg;

/* the e1000 autoneg seems to match ethtool nicely */

ecmd->advertising |= hw->autoneg_advertised;
}

Expand Down Expand Up @@ -285,7 +283,7 @@ e1000_set_pauseparam(struct net_device *netdev,
e1000_reset(adapter);
} else
retval = ((hw->media_type == e1000_media_type_fiber) ?
e1000_setup_link(hw) : e1000_force_mac_fc(hw));
e1000_setup_link(hw) : e1000_force_mac_fc(hw));

clear_bit(__E1000_RESETTING, &adapter->flags);
return retval;
Expand Down Expand Up @@ -774,7 +772,7 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data)
/* The status register is Read Only, so a write should fail.
* Some bits that get toggled are ignored.
*/
switch (adapter->hw.mac_type) {
switch (adapter->hw.mac_type) {
/* there are several bits on newer hardware that are r/w */
case e1000_82571:
case e1000_82572:
Expand Down Expand Up @@ -802,12 +800,14 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data)
}
/* restore previous status */
E1000_WRITE_REG(&adapter->hw, STATUS, before);

if (adapter->hw.mac_type != e1000_ich8lan) {
REG_PATTERN_TEST(FCAL, 0xFFFFFFFF, 0xFFFFFFFF);
REG_PATTERN_TEST(FCAH, 0x0000FFFF, 0xFFFFFFFF);
REG_PATTERN_TEST(FCT, 0x0000FFFF, 0xFFFFFFFF);
REG_PATTERN_TEST(VET, 0x0000FFFF, 0xFFFFFFFF);
}

REG_PATTERN_TEST(RDTR, 0x0000FFFF, 0xFFFFFFFF);
REG_PATTERN_TEST(RDBAH, 0xFFFFFFFF, 0xFFFFFFFF);
REG_PATTERN_TEST(RDLEN, 0x000FFF80, 0x000FFFFF);
Expand All @@ -820,8 +820,9 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data)
REG_PATTERN_TEST(TDLEN, 0x000FFF80, 0x000FFFFF);

REG_SET_AND_CHECK(RCTL, 0xFFFFFFFF, 0x00000000);

before = (adapter->hw.mac_type == e1000_ich8lan ?
0x06C3B33E : 0x06DFB3FE);
0x06C3B33E : 0x06DFB3FE);
REG_SET_AND_CHECK(RCTL, before, 0x003FFFFB);
REG_SET_AND_CHECK(TCTL, 0xFFFFFFFF, 0x00000000);

Expand All @@ -834,10 +835,10 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data)
REG_PATTERN_TEST(TDBAL, 0xFFFFFFF0, 0xFFFFFFFF);
REG_PATTERN_TEST(TIDV, 0x0000FFFF, 0x0000FFFF);
value = (adapter->hw.mac_type == e1000_ich8lan ?
E1000_RAR_ENTRIES_ICH8LAN : E1000_RAR_ENTRIES);
E1000_RAR_ENTRIES_ICH8LAN : E1000_RAR_ENTRIES);
for (i = 0; i < value; i++) {
REG_PATTERN_TEST(RA + (((i << 1) + 1) << 2), 0x8003FFFF,
0xFFFFFFFF);
0xFFFFFFFF);
}

} else {
Expand Down Expand Up @@ -883,8 +884,7 @@ e1000_eeprom_test(struct e1000_adapter *adapter, uint64_t *data)
}

static irqreturn_t
e1000_test_intr(int irq,
void *data)
e1000_test_intr(int irq, void *data)
{
struct net_device *netdev = (struct net_device *) data;
struct e1000_adapter *adapter = netdev_priv(netdev);
Expand All @@ -905,11 +905,11 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)

/* NOTE: we don't test MSI interrupts here, yet */
/* Hook up test interrupt handler just for this test */
if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED,
netdev->name, netdev))
if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED, netdev->name,
netdev))
shared_int = FALSE;
else if (request_irq(irq, &e1000_test_intr, IRQF_SHARED,
netdev->name, netdev)) {
netdev->name, netdev)) {
*data = 1;
return -1;
}
Expand All @@ -925,6 +925,7 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)

if (adapter->hw.mac_type == e1000_ich8lan && i == 8)
continue;

/* Interrupt to test */
mask = 1 << i;

Expand Down Expand Up @@ -1674,7 +1675,7 @@ e1000_diag_test(struct net_device *netdev,
if (e1000_link_test(adapter, &data[4]))
eth_test->flags |= ETH_TEST_FL_FAILED;

/* Offline tests aren't run; pass by default */
/* Online tests aren't run; pass by default */
data[0] = 0;
data[1] = 0;
data[2] = 0;
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/net/e1000/e1000_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2367,6 +2367,7 @@ e1000_phy_force_speed_duplex(struct e1000_hw *hw)

/* Need to reset the PHY or these changes will be ignored */
mii_ctrl_reg |= MII_CR_RESET;

/* Disable MDI-X support for 10/100 */
} else if (hw->phy_type == e1000_phy_ife) {
ret_val = e1000_read_phy_reg(hw, IFE_PHY_MDIX_CONTROL, &phy_data);
Expand All @@ -2379,6 +2380,7 @@ e1000_phy_force_speed_duplex(struct e1000_hw *hw)
ret_val = e1000_write_phy_reg(hw, IFE_PHY_MDIX_CONTROL, phy_data);
if (ret_val)
return ret_val;

} else {
/* Clear Auto-Crossover to force MDI manually. IGP requires MDI
* forced whenever speed or duplex are forced.
Expand Down Expand Up @@ -5841,6 +5843,7 @@ e1000_mta_set(struct e1000_hw *hw,
hash_reg = (hash_value >> 5) & 0x7F;
if (hw->mac_type == e1000_ich8lan)
hash_reg &= 0x1F;

hash_bit = hash_value & 0x1F;

mta = E1000_READ_REG_ARRAY(hw, MTA, hash_reg);
Expand Down Expand Up @@ -6026,6 +6029,7 @@ e1000_id_led_init(struct e1000_hw * hw)
else
eeprom_data = ID_LED_DEFAULT;
}

for (i = 0; i < 4; i++) {
temp = (eeprom_data >> (i << 2)) & led_mask;
switch (temp) {
Expand Down Expand Up @@ -9013,5 +9017,3 @@ e1000_init_lcd_from_nvm(struct e1000_hw *hw)
return E1000_SUCCESS;
}



5 changes: 3 additions & 2 deletions trunk/drivers/net/e1000/e1000_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ int32_t e1000_phy_hw_reset(struct e1000_hw *hw);
int32_t e1000_phy_reset(struct e1000_hw *hw);
int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info);
int32_t e1000_validate_mdi_setting(struct e1000_hw *hw);

void e1000_phy_powerdown_workaround(struct e1000_hw *hw);

/* EEPROM Functions */
Expand Down Expand Up @@ -390,7 +391,6 @@ int32_t e1000_mng_write_dhcp_info(struct e1000_hw *hw, uint8_t *buffer,
uint16_t length);
boolean_t e1000_check_mng_mode(struct e1000_hw *hw);
boolean_t e1000_enable_tx_pkt_filtering(struct e1000_hw *hw);

int32_t e1000_read_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data);
int32_t e1000_validate_eeprom_checksum(struct e1000_hw *hw);
int32_t e1000_update_eeprom_checksum(struct e1000_hw *hw);
Expand Down Expand Up @@ -576,6 +576,7 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
* E1000_RAR_ENTRIES - 1 multicast addresses.
*/
#define E1000_RAR_ENTRIES 15

#define E1000_RAR_ENTRIES_ICH8LAN 6

#define MIN_NUMBER_OF_DESCRIPTORS 8
Expand Down Expand Up @@ -1335,9 +1336,9 @@ struct e1000_hw_stats {
uint64_t gotch;
uint64_t rnbc;
uint64_t ruc;
uint64_t rfc;
uint64_t roc;
uint64_t rlerrc;
uint64_t rfc;
uint64_t rjc;
uint64_t mgprc;
uint64_t mgpdc;
Expand Down
Loading

0 comments on commit b7cd055

Please sign in to comment.