aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r--drivers/net/e1000/e1000_main.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index d7dea6946e85..8302e1881b83 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2255,7 +2255,6 @@ static bool e1000_has_link(struct e1000_adapter *adapter)
2255{ 2255{
2256 struct e1000_hw *hw = &adapter->hw; 2256 struct e1000_hw *hw = &adapter->hw;
2257 bool link_active = false; 2257 bool link_active = false;
2258 s32 ret_val = 0;
2259 2258
2260 /* get_link_status is set on LSC (link status) interrupt or 2259 /* get_link_status is set on LSC (link status) interrupt or
2261 * rx sequence error interrupt. get_link_status will stay 2260 * rx sequence error interrupt. get_link_status will stay
@@ -2265,18 +2264,18 @@ static bool e1000_has_link(struct e1000_adapter *adapter)
2265 switch (hw->media_type) { 2264 switch (hw->media_type) {
2266 case e1000_media_type_copper: 2265 case e1000_media_type_copper:
2267 if (hw->get_link_status) { 2266 if (hw->get_link_status) {
2268 ret_val = e1000_check_for_link(hw); 2267 e1000_check_for_link(hw);
2269 link_active = !hw->get_link_status; 2268 link_active = !hw->get_link_status;
2270 } else { 2269 } else {
2271 link_active = true; 2270 link_active = true;
2272 } 2271 }
2273 break; 2272 break;
2274 case e1000_media_type_fiber: 2273 case e1000_media_type_fiber:
2275 ret_val = e1000_check_for_link(hw); 2274 e1000_check_for_link(hw);
2276 link_active = !!(er32(STATUS) & E1000_STATUS_LU); 2275 link_active = !!(er32(STATUS) & E1000_STATUS_LU);
2277 break; 2276 break;
2278 case e1000_media_type_internal_serdes: 2277 case e1000_media_type_internal_serdes:
2279 ret_val = e1000_check_for_link(hw); 2278 e1000_check_for_link(hw);
2280 link_active = hw->serdes_has_link; 2279 link_active = hw->serdes_has_link;
2281 break; 2280 break;
2282 default: 2281 default:
@@ -4405,8 +4404,7 @@ static void e1000_vlan_rx_register(struct net_device *netdev,
4405 ew32(RCTL, rctl); 4404 ew32(RCTL, rctl);
4406 4405
4407 if (adapter->mng_vlan_id != (u16)E1000_MNG_VLAN_NONE) { 4406 if (adapter->mng_vlan_id != (u16)E1000_MNG_VLAN_NONE) {
4408 e1000_vlan_rx_kill_vid(netdev, 4407 e1000_vlan_rx_kill_vid(netdev, adapter->mng_vlan_id);
4409 adapter->mng_vlan_id);
4410 adapter->mng_vlan_id = E1000_MNG_VLAN_NONE; 4408 adapter->mng_vlan_id = E1000_MNG_VLAN_NONE;
4411 } 4409 }
4412 } 4410 }
@@ -4679,7 +4677,7 @@ static void e1000_netpoll(struct net_device *netdev)
4679/** 4677/**
4680 * e1000_io_error_detected - called when PCI error is detected 4678 * e1000_io_error_detected - called when PCI error is detected
4681 * @pdev: Pointer to PCI device 4679 * @pdev: Pointer to PCI device
4682 * @state: The current pci conneection state 4680 * @state: The current pci connection state
4683 * 4681 *
4684 * This function is called after a PCI bus error affecting 4682 * This function is called after a PCI bus error affecting
4685 * this device has been detected. 4683 * this device has been detected.