Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171786
b: refs/heads/master
c: 3bb99fe
h: refs/heads/master
v: v3
  • Loading branch information
Bruce Allan authored and David S. Miller committed Nov 21, 2009
1 parent 52743f9 commit cde6804
Show file tree
Hide file tree
Showing 9 changed files with 184 additions and 207 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: d8014dbca7f5d2d6f0fdb47e5286bd2d887f7065
refs/heads/master: 3bb99fe226ead584a4db674dab546689f705201f
40 changes: 20 additions & 20 deletions trunk/drivers/net/e1000e/82571.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter)
* indicates that the bootagent or EFI code has
* improperly left this bit enabled
*/
hw_dbg(hw, "Please update your 82571 Bootagent\n");
e_dbg("Please update your 82571 Bootagent\n");
}
ew32(SWSM, swsm & ~E1000_SWSM_SMBI);
}
Expand Down Expand Up @@ -483,7 +483,7 @@ static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw)
}

if (i == sw_timeout) {
hw_dbg(hw, "Driver can't access device - SMBI bit is set.\n");
e_dbg("Driver can't access device - SMBI bit is set.\n");
hw->dev_spec.e82571.smb_counter++;
}
/* Get the FW semaphore. */
Expand All @@ -501,7 +501,7 @@ static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw)
if (i == fw_timeout) {
/* Release semaphores */
e1000_put_hw_semaphore_82571(hw);
hw_dbg(hw, "Driver can't access the NVM\n");
e_dbg("Driver can't access the NVM\n");
return -E1000_ERR_NVM;
}

Expand Down Expand Up @@ -708,7 +708,7 @@ static s32 e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset,
*/
if ((offset >= nvm->word_size) || (words > (nvm->word_size - offset)) ||
(words == 0)) {
hw_dbg(hw, "nvm parameter(s) out of bounds\n");
e_dbg("nvm parameter(s) out of bounds\n");
return -E1000_ERR_NVM;
}

Expand Down Expand Up @@ -749,7 +749,7 @@ static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw)
timeout--;
}
if (!timeout) {
hw_dbg(hw, "MNG configuration cycle has not completed.\n");
e_dbg("MNG configuration cycle has not completed.\n");
return -E1000_ERR_RESET;
}

Expand Down Expand Up @@ -848,9 +848,9 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
*/
ret_val = e1000e_disable_pcie_master(hw);
if (ret_val)
hw_dbg(hw, "PCI-E Master disable polling has failed.\n");
e_dbg("PCI-E Master disable polling has failed.\n");

hw_dbg(hw, "Masking off all interrupts\n");
e_dbg("Masking off all interrupts\n");
ew32(IMC, 0xffffffff);

ew32(RCTL, 0);
Expand Down Expand Up @@ -889,7 +889,7 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw)

ctrl = er32(CTRL);

hw_dbg(hw, "Issuing a global reset to MAC\n");
e_dbg("Issuing a global reset to MAC\n");
ew32(CTRL, ctrl | E1000_CTRL_RST);

if (hw->nvm.type == e1000_nvm_flash_hw) {
Expand Down Expand Up @@ -955,12 +955,12 @@ static s32 e1000_init_hw_82571(struct e1000_hw *hw)
/* Initialize identification LED */
ret_val = e1000e_id_led_init(hw);
if (ret_val) {
hw_dbg(hw, "Error initializing identification LED\n");
e_dbg("Error initializing identification LED\n");
return ret_val;
}

/* Disabling VLAN filtering */
hw_dbg(hw, "Initializing the IEEE VLAN\n");
e_dbg("Initializing the IEEE VLAN\n");
e1000e_clear_vfta(hw);

/* Setup the receive address. */
Expand All @@ -974,7 +974,7 @@ static s32 e1000_init_hw_82571(struct e1000_hw *hw)
e1000e_init_rx_addrs(hw, rar_count);

/* Zero out the Multicast HASH table */
hw_dbg(hw, "Zeroing the MTA\n");
e_dbg("Zeroing the MTA\n");
for (i = 0; i < mac->mta_reg_count; i++)
E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0);

Expand Down Expand Up @@ -1383,7 +1383,7 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
*/
mac->serdes_link_state =
e1000_serdes_link_autoneg_progress;
hw_dbg(hw, "AN_UP -> AN_PROG\n");
e_dbg("AN_UP -> AN_PROG\n");
}
break;

Expand All @@ -1401,7 +1401,7 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
(ctrl & ~E1000_CTRL_SLU));
mac->serdes_link_state =
e1000_serdes_link_autoneg_progress;
hw_dbg(hw, "FORCED_UP -> AN_PROG\n");
e_dbg("FORCED_UP -> AN_PROG\n");
}
break;

Expand All @@ -1415,7 +1415,7 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
if (status & E1000_STATUS_LU) {
mac->serdes_link_state =
e1000_serdes_link_autoneg_complete;
hw_dbg(hw, "AN_PROG -> AN_UP\n");
e_dbg("AN_PROG -> AN_UP\n");
} else {
/*
* Disable autoneg, force link up and
Expand All @@ -1430,12 +1430,12 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
ret_val =
e1000e_config_fc_after_link_up(hw);
if (ret_val) {
hw_dbg(hw, "Error config flow control\n");
e_dbg("Error config flow control\n");
break;
}
mac->serdes_link_state =
e1000_serdes_link_forced_up;
hw_dbg(hw, "AN_PROG -> FORCED_UP\n");
e_dbg("AN_PROG -> FORCED_UP\n");
}
mac->serdes_has_link = true;
break;
Expand All @@ -1450,14 +1450,14 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
(ctrl & ~E1000_CTRL_SLU));
mac->serdes_link_state =
e1000_serdes_link_autoneg_progress;
hw_dbg(hw, "DOWN -> AN_PROG\n");
e_dbg("DOWN -> AN_PROG\n");
break;
}
} else {
if (!(rxcw & E1000_RXCW_SYNCH)) {
mac->serdes_has_link = false;
mac->serdes_link_state = e1000_serdes_link_down;
hw_dbg(hw, "ANYSTATE -> DOWN\n");
e_dbg("ANYSTATE -> DOWN\n");
} else {
/*
* We have sync, and can tolerate one
Expand All @@ -1469,7 +1469,7 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
if (rxcw & E1000_RXCW_IV) {
mac->serdes_link_state = e1000_serdes_link_down;
mac->serdes_has_link = false;
hw_dbg(hw, "ANYSTATE -> DOWN\n");
e_dbg("ANYSTATE -> DOWN\n");
}
}
}
Expand All @@ -1491,7 +1491,7 @@ static s32 e1000_valid_led_default_82571(struct e1000_hw *hw, u16 *data)

ret_val = e1000_read_nvm(hw, NVM_ID_LED_SETTINGS, 1, data);
if (ret_val) {
hw_dbg(hw, "NVM Read Error\n");
e_dbg("NVM Read Error\n");
return ret_val;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/e1000e/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ struct e1000_info;

#ifdef DEBUG
#define e_dbg(format, arg...) \
e_printk(KERN_DEBUG , adapter, format, ## arg)
e_printk(KERN_DEBUG , hw->adapter, format, ## arg)
#else
#define e_dbg(format, arg...) do { (void)(adapter); } while (0)
#define e_dbg(format, arg...) do { (void)(hw); } while (0)
#endif

#define e_err(format, arg...) \
Expand Down
23 changes: 11 additions & 12 deletions trunk/drivers/net/e1000e/es2lan.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,7 @@ static s32 e1000_acquire_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask)
}

if (i == timeout) {
hw_dbg(hw,
"Driver can't access resource, SW_FW_SYNC timeout.\n");
e_dbg("Driver can't access resource, SW_FW_SYNC timeout.\n");
return -E1000_ERR_SWFW_SYNC;
}

Expand Down Expand Up @@ -597,7 +596,7 @@ static s32 e1000_get_cfg_done_80003es2lan(struct e1000_hw *hw)
timeout--;
}
if (!timeout) {
hw_dbg(hw, "MNG configuration cycle has not completed.\n");
e_dbg("MNG configuration cycle has not completed.\n");
return -E1000_ERR_RESET;
}

Expand Down Expand Up @@ -630,7 +629,7 @@ static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw)
if (ret_val)
return ret_val;

hw_dbg(hw, "GG82563 PSCR: %X\n", phy_data);
e_dbg("GG82563 PSCR: %X\n", phy_data);

ret_val = e1e_rphy(hw, PHY_CONTROL, &phy_data);
if (ret_val)
Expand All @@ -648,7 +647,7 @@ static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw)
udelay(1);

if (hw->phy.autoneg_wait_to_complete) {
hw_dbg(hw, "Waiting for forced speed/duplex link "
e_dbg("Waiting for forced speed/duplex link "
"on GG82563 phy.\n");

ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT,
Expand Down Expand Up @@ -771,9 +770,9 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw)
*/
ret_val = e1000e_disable_pcie_master(hw);
if (ret_val)
hw_dbg(hw, "PCI-E Master disable polling has failed.\n");
e_dbg("PCI-E Master disable polling has failed.\n");

hw_dbg(hw, "Masking off all interrupts\n");
e_dbg("Masking off all interrupts\n");
ew32(IMC, 0xffffffff);

ew32(RCTL, 0);
Expand All @@ -785,7 +784,7 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw)
ctrl = er32(CTRL);

ret_val = e1000_acquire_phy_80003es2lan(hw);
hw_dbg(hw, "Issuing a global reset to MAC\n");
e_dbg("Issuing a global reset to MAC\n");
ew32(CTRL, ctrl | E1000_CTRL_RST);
e1000_release_phy_80003es2lan(hw);

Expand Down Expand Up @@ -820,19 +819,19 @@ static s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw)
/* Initialize identification LED */
ret_val = e1000e_id_led_init(hw);
if (ret_val) {
hw_dbg(hw, "Error initializing identification LED\n");
e_dbg("Error initializing identification LED\n");
return ret_val;
}

/* Disabling VLAN filtering */
hw_dbg(hw, "Initializing the IEEE VLAN\n");
e_dbg("Initializing the IEEE VLAN\n");
e1000e_clear_vfta(hw);

/* Setup the receive address. */
e1000e_init_rx_addrs(hw, mac->rar_entry_count);

/* Zero out the Multicast HASH table */
hw_dbg(hw, "Zeroing the MTA\n");
e_dbg("Zeroing the MTA\n");
for (i = 0; i < mac->mta_reg_count; i++)
E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0);

Expand Down Expand Up @@ -989,7 +988,7 @@ static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw)
/* SW Reset the PHY so all changes take effect */
ret_val = e1000e_commit_phy(hw);
if (ret_val) {
hw_dbg(hw, "Error Resetting the PHY\n");
e_dbg("Error Resetting the PHY\n");
return ret_val;
}

Expand Down
11 changes: 0 additions & 11 deletions trunk/drivers/net/e1000e/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -925,15 +925,4 @@ struct e1000_hw {
} dev_spec;
};

#ifdef DEBUG
#define hw_dbg(hw, format, arg...) \
printk(KERN_DEBUG "%s: " format, e1000e_get_hw_dev_name(hw), ##arg)
#else
static inline int __attribute__ ((format (printf, 2, 3)))
hw_dbg(struct e1000_hw *hw, const char *format, ...)
{
return 0;
}
#endif

#endif
Loading

0 comments on commit cde6804

Please sign in to comment.