Commit 4fa7553a075918e1e02a6039f9e826c8872b7049

Authored by Jesse Brandeburg
Committed by Linus Torvalds
1 parent 23033fad5b

e1000e: drop stats lock

the stats lock is left over from e1000, e1000e no longer
has the adjust tbi stats function that required the addition
of the stats lock to begin with.

adding a mutex to acquire_swflag helped catch this one too.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 2 changed files with 0 additions and 19 deletions Side-by-side Diff

drivers/net/e1000e/e1000.h
... ... @@ -257,7 +257,6 @@
257 257 struct net_device *netdev;
258 258 struct pci_dev *pdev;
259 259 struct net_device_stats net_stats;
260   - spinlock_t stats_lock; /* prevent concurrent stats updates */
261 260  
262 261 /* structs defined in e1000_hw.h */
263 262 struct e1000_hw hw;
drivers/net/e1000e/netdev.c
... ... @@ -2600,8 +2600,6 @@
2600 2600 /* Explicitly disable IRQ since the NIC can be in any state. */
2601 2601 e1000_irq_disable(adapter);
2602 2602  
2603   - spin_lock_init(&adapter->stats_lock);
2604   -
2605 2603 set_bit(__E1000_DOWN, &adapter->state);
2606 2604 return 0;
2607 2605  
... ... @@ -2953,7 +2951,6 @@
2953 2951 {
2954 2952 struct e1000_hw *hw = &adapter->hw;
2955 2953 struct pci_dev *pdev = adapter->pdev;
2956   - unsigned long irq_flags;
2957 2954  
2958 2955 /*
2959 2956 * Prevent stats update while adapter is being reset, or if the pci
... ... @@ -2964,14 +2961,6 @@
2964 2961 if (pci_channel_offline(pdev))
2965 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 2964 adapter->stats.crcerrs += er32(CRCERRS);
2976 2965 adapter->stats.gprc += er32(GPRC);
2977 2966 adapter->stats.gorc += er32(GORCL);
... ... @@ -3046,8 +3035,6 @@
3046 3035 adapter->stats.mgptc += er32(MGTPTC);
3047 3036 adapter->stats.mgprc += er32(MGTPRC);
3048 3037 adapter->stats.mgpdc += er32(MGTPDC);
3049   -
3050   - spin_unlock_irqrestore(&adapter->stats_lock, irq_flags);
3051 3038 }
3052 3039  
3053 3040 /**
3054 3041  
... ... @@ -3059,10 +3046,7 @@
3059 3046 struct e1000_hw *hw = &adapter->hw;
3060 3047 struct e1000_phy_regs *phy = &adapter->phy_regs;
3061 3048 int ret_val;
3062   - unsigned long irq_flags;
3063 3049  
3064   - spin_lock_irqsave(&adapter->stats_lock, irq_flags);
3065   -
3066 3050 if ((er32(STATUS) & E1000_STATUS_LU) &&
3067 3051 (adapter->hw.phy.media_type == e1000_media_type_copper)) {
3068 3052 ret_val = e1e_rphy(hw, PHY_CONTROL, &phy->bmcr);
... ... @@ -3092,8 +3076,6 @@
3092 3076 phy->stat1000 = 0;
3093 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  
3099 3081 static void e1000_print_link_info(struct e1000_adapter *adapter)