aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/e1000e/e1000.h1
-rw-r--r--drivers/net/e1000e/netdev.c18
2 files changed, 0 insertions, 19 deletions
diff --git a/drivers/net/e1000e/e1000.h b/drivers/net/e1000e/e1000.h
index 8087bda97218..5ea6b60fa377 100644
--- a/drivers/net/e1000e/e1000.h
+++ b/drivers/net/e1000e/e1000.h
@@ -257,7 +257,6 @@ struct e1000_adapter {
257 struct net_device *netdev; 257 struct net_device *netdev;
258 struct pci_dev *pdev; 258 struct pci_dev *pdev;
259 struct net_device_stats net_stats; 259 struct net_device_stats net_stats;
260 spinlock_t stats_lock; /* prevent concurrent stats updates */
261 260
262 /* structs defined in e1000_hw.h */ 261 /* structs defined in e1000_hw.h */
263 struct e1000_hw hw; 262 struct e1000_hw hw;
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 835b692e4fe3..01e95580d4ae 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2600,8 +2600,6 @@ static int __devinit e1000_sw_init(struct e1000_adapter *adapter)
2600 /* Explicitly disable IRQ since the NIC can be in any state. */ 2600 /* Explicitly disable IRQ since the NIC can be in any state. */
2601 e1000_irq_disable(adapter); 2601 e1000_irq_disable(adapter);
2602 2602
2603 spin_lock_init(&adapter->stats_lock);
2604
2605 set_bit(__E1000_DOWN, &adapter->state); 2603 set_bit(__E1000_DOWN, &adapter->state);
2606 return 0; 2604 return 0;
2607 2605
@@ -2953,7 +2951,6 @@ void e1000e_update_stats(struct e1000_adapter *adapter)
2953{ 2951{
2954 struct e1000_hw *hw = &adapter->hw; 2952 struct e1000_hw *hw = &adapter->hw;
2955 struct pci_dev *pdev = adapter->pdev; 2953 struct pci_dev *pdev = adapter->pdev;
2956 unsigned long irq_flags;
2957 2954
2958 /* 2955 /*
2959 * Prevent stats update while adapter is being reset, or if the pci 2956 * Prevent stats update while adapter is being reset, or if the pci
@@ -2964,14 +2961,6 @@ void e1000e_update_stats(struct e1000_adapter *adapter)
2964 if (pci_channel_offline(pdev)) 2961 if (pci_channel_offline(pdev))
2965 return; 2962 return;
2966 2963
2967 spin_lock_irqsave(&adapter->stats_lock, irq_flags);
2968
2969 /*
2970 * these counters are modified from e1000_adjust_tbi_stats,
2971 * called from the interrupt context, so they must only
2972 * be written while holding adapter->stats_lock
2973 */
2974
2975 adapter->stats.crcerrs += er32(CRCERRS); 2964 adapter->stats.crcerrs += er32(CRCERRS);
2976 adapter->stats.gprc += er32(GPRC); 2965 adapter->stats.gprc += er32(GPRC);
2977 adapter->stats.gorc += er32(GORCL); 2966 adapter->stats.gorc += er32(GORCL);
@@ -3046,8 +3035,6 @@ void e1000e_update_stats(struct e1000_adapter *adapter)
3046 adapter->stats.mgptc += er32(MGTPTC); 3035 adapter->stats.mgptc += er32(MGTPTC);
3047 adapter->stats.mgprc += er32(MGTPRC); 3036 adapter->stats.mgprc += er32(MGTPRC);
3048 adapter->stats.mgpdc += er32(MGTPDC); 3037 adapter->stats.mgpdc += er32(MGTPDC);
3049
3050 spin_unlock_irqrestore(&adapter->stats_lock, irq_flags);
3051} 3038}
3052 3039
3053/** 3040/**
@@ -3059,9 +3046,6 @@ static void e1000_phy_read_status(struct e1000_adapter *adapter)
3059 struct e1000_hw *hw = &adapter->hw; 3046 struct e1000_hw *hw = &adapter->hw;
3060 struct e1000_phy_regs *phy = &adapter->phy_regs; 3047 struct e1000_phy_regs *phy = &adapter->phy_regs;
3061 int ret_val; 3048 int ret_val;
3062 unsigned long irq_flags;
3063
3064 spin_lock_irqsave(&adapter->stats_lock, irq_flags);
3065 3049
3066 if ((er32(STATUS) & E1000_STATUS_LU) && 3050 if ((er32(STATUS) & E1000_STATUS_LU) &&
3067 (adapter->hw.phy.media_type == e1000_media_type_copper)) { 3051 (adapter->hw.phy.media_type == e1000_media_type_copper)) {
@@ -3092,8 +3076,6 @@ static void e1000_phy_read_status(struct e1000_adapter *adapter)
3092 phy->stat1000 = 0; 3076 phy->stat1000 = 0;
3093 phy->estatus = (ESTATUS_1000_TFULL | ESTATUS_1000_THALF); 3077 phy->estatus = (ESTATUS_1000_TFULL | ESTATUS_1000_THALF);
3094 } 3078 }
3095
3096 spin_unlock_irqrestore(&adapter->stats_lock, irq_flags);
3097} 3079}
3098 3080
3099static void e1000_print_link_info(struct e1000_adapter *adapter) 3081static void e1000_print_link_info(struct e1000_adapter *adapter)