diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2012-02-22 22:13:18 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-03-01 02:12:45 -0500 |
commit | 3d3a1676561cfb0dcef0cf5e146ddefbb16f5598 (patch) | |
tree | 61b013aabe8ccda988d861fd235a8d67c7bf03c8 | |
parent | 06c24b915cad962b4dce6760fb130677123bc6c3 (diff) |
e1000e: cleanup whitespace and indentation
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/82571.c | 14 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ich8lan.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/mac.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/netdev.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/phy.c | 59 |
5 files changed, 38 insertions, 57 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c index 086dad709179..b3fdc6977f2e 100644 --- a/drivers/net/ethernet/intel/e1000e/82571.c +++ b/drivers/net/ethernet/intel/e1000e/82571.c | |||
@@ -1269,18 +1269,16 @@ static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw) | |||
1269 | reg |= E1000_PBA_ECC_CORR_EN; | 1269 | reg |= E1000_PBA_ECC_CORR_EN; |
1270 | ew32(PBA_ECC, reg); | 1270 | ew32(PBA_ECC, reg); |
1271 | } | 1271 | } |
1272 | |||
1272 | /* | 1273 | /* |
1273 | * Workaround for hardware errata. | 1274 | * Workaround for hardware errata. |
1274 | * Ensure that DMA Dynamic Clock gating is disabled on 82571 and 82572 | 1275 | * Ensure that DMA Dynamic Clock gating is disabled on 82571 and 82572 |
1275 | */ | 1276 | */ |
1276 | 1277 | if ((hw->mac.type == e1000_82571) || (hw->mac.type == e1000_82572)) { | |
1277 | if ((hw->mac.type == e1000_82571) || | 1278 | reg = er32(CTRL_EXT); |
1278 | (hw->mac.type == e1000_82572)) { | 1279 | reg &= ~E1000_CTRL_EXT_DMA_DYN_CLK_EN; |
1279 | reg = er32(CTRL_EXT); | 1280 | ew32(CTRL_EXT, reg); |
1280 | reg &= ~E1000_CTRL_EXT_DMA_DYN_CLK_EN; | 1281 | } |
1281 | ew32(CTRL_EXT, reg); | ||
1282 | } | ||
1283 | |||
1284 | 1282 | ||
1285 | /* PCI-Ex Control Registers */ | 1283 | /* PCI-Ex Control Registers */ |
1286 | switch (hw->mac.type) { | 1284 | switch (hw->mac.type) { |
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index 8e9af624d54a..64c76443a7aa 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c | |||
@@ -1230,9 +1230,8 @@ s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable) | |||
1230 | u32 reg = 0; | 1230 | u32 reg = 0; |
1231 | u16 kmrn_reg = 0; | 1231 | u16 kmrn_reg = 0; |
1232 | 1232 | ||
1233 | ret_val = e1000e_read_kmrn_reg_locked(hw, | 1233 | ret_val = e1000e_read_kmrn_reg_locked(hw, E1000_KMRNCTRLSTA_K1_CONFIG, |
1234 | E1000_KMRNCTRLSTA_K1_CONFIG, | 1234 | &kmrn_reg); |
1235 | &kmrn_reg); | ||
1236 | if (ret_val) | 1235 | if (ret_val) |
1237 | return ret_val; | 1236 | return ret_val; |
1238 | 1237 | ||
@@ -1241,9 +1240,8 @@ s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable) | |||
1241 | else | 1240 | else |
1242 | kmrn_reg &= ~E1000_KMRNCTRLSTA_K1_ENABLE; | 1241 | kmrn_reg &= ~E1000_KMRNCTRLSTA_K1_ENABLE; |
1243 | 1242 | ||
1244 | ret_val = e1000e_write_kmrn_reg_locked(hw, | 1243 | ret_val = e1000e_write_kmrn_reg_locked(hw, E1000_KMRNCTRLSTA_K1_CONFIG, |
1245 | E1000_KMRNCTRLSTA_K1_CONFIG, | 1244 | kmrn_reg); |
1246 | kmrn_reg); | ||
1247 | if (ret_val) | 1245 | if (ret_val) |
1248 | return ret_val; | 1246 | return ret_val; |
1249 | 1247 | ||
diff --git a/drivers/net/ethernet/intel/e1000e/mac.c b/drivers/net/ethernet/intel/e1000e/mac.c index 59ac9f6353de..decad98c1059 100644 --- a/drivers/net/ethernet/intel/e1000e/mac.c +++ b/drivers/net/ethernet/intel/e1000e/mac.c | |||
@@ -629,7 +629,7 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw) | |||
629 | if (E1000_TXCW_ANE & er32(TXCW)) { | 629 | if (E1000_TXCW_ANE & er32(TXCW)) { |
630 | status = er32(STATUS); | 630 | status = er32(STATUS); |
631 | if (status & E1000_STATUS_LU) { | 631 | if (status & E1000_STATUS_LU) { |
632 | /* SYNCH bit and IV bit are sticky, so reread rxcw. */ | 632 | /* SYNCH bit and IV bit are sticky, so reread rxcw. */ |
633 | udelay(10); | 633 | udelay(10); |
634 | rxcw = er32(RXCW); | 634 | rxcw = er32(RXCW); |
635 | if (rxcw & E1000_RXCW_SYNCH) { | 635 | if (rxcw & E1000_RXCW_SYNCH) { |
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index efb37290262d..a9a4ea2c616e 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | |||
@@ -3262,6 +3262,7 @@ static void e1000e_set_rx_mode(struct net_device *netdev) | |||
3262 | e1000e_vlan_filter_disable(adapter); | 3262 | e1000e_vlan_filter_disable(adapter); |
3263 | } else { | 3263 | } else { |
3264 | int count; | 3264 | int count; |
3265 | |||
3265 | if (netdev->flags & IFF_ALLMULTI) { | 3266 | if (netdev->flags & IFF_ALLMULTI) { |
3266 | rctl |= E1000_RCTL_MPE; | 3267 | rctl |= E1000_RCTL_MPE; |
3267 | } else { | 3268 | } else { |
@@ -6103,7 +6104,6 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
6103 | const struct e1000_info *ei = e1000_info_tbl[ent->driver_data]; | 6104 | const struct e1000_info *ei = e1000_info_tbl[ent->driver_data]; |
6104 | resource_size_t mmio_start, mmio_len; | 6105 | resource_size_t mmio_start, mmio_len; |
6105 | resource_size_t flash_start, flash_len; | 6106 | resource_size_t flash_start, flash_len; |
6106 | |||
6107 | static int cards_found; | 6107 | static int cards_found; |
6108 | u16 aspm_disable_flag = 0; | 6108 | u16 aspm_disable_flag = 0; |
6109 | int i, err, pci_using_dac; | 6109 | int i, err, pci_using_dac; |
@@ -6347,11 +6347,11 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
6347 | } else if (adapter->flags & FLAG_APME_IN_CTRL3) { | 6347 | } else if (adapter->flags & FLAG_APME_IN_CTRL3) { |
6348 | if (adapter->flags & FLAG_APME_CHECK_PORT_B && | 6348 | if (adapter->flags & FLAG_APME_CHECK_PORT_B && |
6349 | (adapter->hw.bus.func == 1)) | 6349 | (adapter->hw.bus.func == 1)) |
6350 | e1000_read_nvm(&adapter->hw, | 6350 | e1000_read_nvm(&adapter->hw, NVM_INIT_CONTROL3_PORT_B, |
6351 | NVM_INIT_CONTROL3_PORT_B, 1, &eeprom_data); | 6351 | 1, &eeprom_data); |
6352 | else | 6352 | else |
6353 | e1000_read_nvm(&adapter->hw, | 6353 | e1000_read_nvm(&adapter->hw, NVM_INIT_CONTROL3_PORT_A, |
6354 | NVM_INIT_CONTROL3_PORT_A, 1, &eeprom_data); | 6354 | 1, &eeprom_data); |
6355 | } | 6355 | } |
6356 | 6356 | ||
6357 | /* fetch WoL from EEPROM */ | 6357 | /* fetch WoL from EEPROM */ |
diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c index 683abac4a049..6e768b11380e 100644 --- a/drivers/net/ethernet/intel/e1000e/phy.c +++ b/drivers/net/ethernet/intel/e1000e/phy.c | |||
@@ -1007,12 +1007,12 @@ static s32 e1000_phy_setup_autoneg(struct e1000_hw *hw) | |||
1007 | * The possible values of the "fc" parameter are: | 1007 | * The possible values of the "fc" parameter are: |
1008 | * 0: Flow control is completely disabled | 1008 | * 0: Flow control is completely disabled |
1009 | * 1: Rx flow control is enabled (we can receive pause frames | 1009 | * 1: Rx flow control is enabled (we can receive pause frames |
1010 | * but not send pause frames). | 1010 | * but not send pause frames). |
1011 | * 2: Tx flow control is enabled (we can send pause frames | 1011 | * 2: Tx flow control is enabled (we can send pause frames |
1012 | * but we do not support receiving pause frames). | 1012 | * but we do not support receiving pause frames). |
1013 | * 3: Both Rx and Tx flow control (symmetric) are enabled. | 1013 | * 3: Both Rx and Tx flow control (symmetric) are enabled. |
1014 | * other: No software override. The flow control configuration | 1014 | * other: No software override. The flow control configuration |
1015 | * in the EEPROM is used. | 1015 | * in the EEPROM is used. |
1016 | */ | 1016 | */ |
1017 | switch (hw->fc.current_mode) { | 1017 | switch (hw->fc.current_mode) { |
1018 | case e1000_fc_none: | 1018 | case e1000_fc_none: |
@@ -1172,10 +1172,8 @@ s32 e1000e_setup_copper_link(struct e1000_hw *hw) | |||
1172 | * Check link status. Wait up to 100 microseconds for link to become | 1172 | * Check link status. Wait up to 100 microseconds for link to become |
1173 | * valid. | 1173 | * valid. |
1174 | */ | 1174 | */ |
1175 | ret_val = e1000e_phy_has_link_generic(hw, | 1175 | ret_val = e1000e_phy_has_link_generic(hw, COPPER_LINK_UP_LIMIT, 10, |
1176 | COPPER_LINK_UP_LIMIT, | 1176 | &link); |
1177 | 10, | ||
1178 | &link); | ||
1179 | if (ret_val) | 1177 | if (ret_val) |
1180 | return ret_val; | 1178 | return ret_val; |
1181 | 1179 | ||
@@ -1237,10 +1235,8 @@ s32 e1000e_phy_force_speed_duplex_igp(struct e1000_hw *hw) | |||
1237 | if (phy->autoneg_wait_to_complete) { | 1235 | if (phy->autoneg_wait_to_complete) { |
1238 | e_dbg("Waiting for forced speed/duplex link on IGP phy.\n"); | 1236 | e_dbg("Waiting for forced speed/duplex link on IGP phy.\n"); |
1239 | 1237 | ||
1240 | ret_val = e1000e_phy_has_link_generic(hw, | 1238 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
1241 | PHY_FORCE_LIMIT, | 1239 | 100000, &link); |
1242 | 100000, | ||
1243 | &link); | ||
1244 | if (ret_val) | 1240 | if (ret_val) |
1245 | return ret_val; | 1241 | return ret_val; |
1246 | 1242 | ||
@@ -1248,10 +1244,8 @@ s32 e1000e_phy_force_speed_duplex_igp(struct e1000_hw *hw) | |||
1248 | e_dbg("Link taking longer than expected.\n"); | 1244 | e_dbg("Link taking longer than expected.\n"); |
1249 | 1245 | ||
1250 | /* Try once more */ | 1246 | /* Try once more */ |
1251 | ret_val = e1000e_phy_has_link_generic(hw, | 1247 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
1252 | PHY_FORCE_LIMIT, | 1248 | 100000, &link); |
1253 | 100000, | ||
1254 | &link); | ||
1255 | } | 1249 | } |
1256 | 1250 | ||
1257 | return ret_val; | 1251 | return ret_val; |
@@ -1412,10 +1406,8 @@ s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw) | |||
1412 | if (phy->autoneg_wait_to_complete) { | 1406 | if (phy->autoneg_wait_to_complete) { |
1413 | e_dbg("Waiting for forced speed/duplex link on IFE phy.\n"); | 1407 | e_dbg("Waiting for forced speed/duplex link on IFE phy.\n"); |
1414 | 1408 | ||
1415 | ret_val = e1000e_phy_has_link_generic(hw, | 1409 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
1416 | PHY_FORCE_LIMIT, | 1410 | 100000, &link); |
1417 | 100000, | ||
1418 | &link); | ||
1419 | if (ret_val) | 1411 | if (ret_val) |
1420 | return ret_val; | 1412 | return ret_val; |
1421 | 1413 | ||
@@ -1423,10 +1415,8 @@ s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw) | |||
1423 | e_dbg("Link taking longer than expected.\n"); | 1415 | e_dbg("Link taking longer than expected.\n"); |
1424 | 1416 | ||
1425 | /* Try once more */ | 1417 | /* Try once more */ |
1426 | ret_val = e1000e_phy_has_link_generic(hw, | 1418 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
1427 | PHY_FORCE_LIMIT, | 1419 | 100000, &link); |
1428 | 100000, | ||
1429 | &link); | ||
1430 | if (ret_val) | 1420 | if (ret_val) |
1431 | return ret_val; | 1421 | return ret_val; |
1432 | } | 1422 | } |
@@ -2167,6 +2157,7 @@ s32 e1000e_phy_hw_reset_generic(struct e1000_hw *hw) | |||
2167 | s32 e1000e_get_cfg_done(struct e1000_hw *hw) | 2157 | s32 e1000e_get_cfg_done(struct e1000_hw *hw) |
2168 | { | 2158 | { |
2169 | mdelay(10); | 2159 | mdelay(10); |
2160 | |||
2170 | return 0; | 2161 | return 0; |
2171 | } | 2162 | } |
2172 | 2163 | ||
@@ -3155,13 +3146,11 @@ s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw) | |||
3155 | if (ret_val) | 3146 | if (ret_val) |
3156 | return ret_val; | 3147 | return ret_val; |
3157 | 3148 | ||
3158 | data &= BM_CS_STATUS_LINK_UP | | 3149 | data &= BM_CS_STATUS_LINK_UP | BM_CS_STATUS_RESOLVED | |
3159 | BM_CS_STATUS_RESOLVED | | 3150 | BM_CS_STATUS_SPEED_MASK; |
3160 | BM_CS_STATUS_SPEED_MASK; | ||
3161 | 3151 | ||
3162 | if (data != (BM_CS_STATUS_LINK_UP | | 3152 | if (data != (BM_CS_STATUS_LINK_UP | BM_CS_STATUS_RESOLVED | |
3163 | BM_CS_STATUS_RESOLVED | | 3153 | BM_CS_STATUS_SPEED_1000)) |
3164 | BM_CS_STATUS_SPEED_1000)) | ||
3165 | return 0; | 3154 | return 0; |
3166 | 3155 | ||
3167 | mdelay(200); | 3156 | mdelay(200); |
@@ -3227,10 +3216,8 @@ s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw) | |||
3227 | if (phy->autoneg_wait_to_complete) { | 3216 | if (phy->autoneg_wait_to_complete) { |
3228 | e_dbg("Waiting for forced speed/duplex link on 82577 phy\n"); | 3217 | e_dbg("Waiting for forced speed/duplex link on 82577 phy\n"); |
3229 | 3218 | ||
3230 | ret_val = e1000e_phy_has_link_generic(hw, | 3219 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
3231 | PHY_FORCE_LIMIT, | 3220 | 100000, &link); |
3232 | 100000, | ||
3233 | &link); | ||
3234 | if (ret_val) | 3221 | if (ret_val) |
3235 | return ret_val; | 3222 | return ret_val; |
3236 | 3223 | ||
@@ -3238,10 +3225,8 @@ s32 e1000_phy_force_speed_duplex_82577(struct e1000_hw *hw) | |||
3238 | e_dbg("Link taking longer than expected.\n"); | 3225 | e_dbg("Link taking longer than expected.\n"); |
3239 | 3226 | ||
3240 | /* Try once more */ | 3227 | /* Try once more */ |
3241 | ret_val = e1000e_phy_has_link_generic(hw, | 3228 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
3242 | PHY_FORCE_LIMIT, | 3229 | 100000, &link); |
3243 | 100000, | ||
3244 | &link); | ||
3245 | } | 3230 | } |
3246 | 3231 | ||
3247 | return ret_val; | 3232 | return ret_val; |