diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2008-10-02 19:33:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-02 21:28:12 -0400 |
commit | 23033fad5be0a2c7838cb9e1579919b64af713f6 (patch) | |
tree | cca0e10a7f6c26c20fd2c4d97d7bde911a1b1300 /drivers/net/e1000e/netdev.c | |
parent | a8f88ff5a5abc2ce9f7d7d2694178b2c617d713a (diff) |
e1000e: remove phy read from inside spinlock
thanks to tglx, we're finding some interesting reentrancy issues.
this patch removes the phy read from inside a spinlock, paving
the way for removing the spinlock completely. The phy read was
only feeding a statistic that wasn't used.
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>
Diffstat (limited to 'drivers/net/e1000e/netdev.c')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 803545b2fc8c..835b692e4fe3 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -2954,9 +2954,6 @@ void e1000e_update_stats(struct e1000_adapter *adapter) | |||
2954 | struct e1000_hw *hw = &adapter->hw; | 2954 | struct e1000_hw *hw = &adapter->hw; |
2955 | struct pci_dev *pdev = adapter->pdev; | 2955 | struct pci_dev *pdev = adapter->pdev; |
2956 | unsigned long irq_flags; | 2956 | unsigned long irq_flags; |
2957 | u16 phy_tmp; | ||
2958 | |||
2959 | #define PHY_IDLE_ERROR_COUNT_MASK 0x00FF | ||
2960 | 2957 | ||
2961 | /* | 2958 | /* |
2962 | * Prevent stats update while adapter is being reset, or if the pci | 2959 | * Prevent stats update while adapter is being reset, or if the pci |
@@ -3045,15 +3042,6 @@ void e1000e_update_stats(struct e1000_adapter *adapter) | |||
3045 | 3042 | ||
3046 | /* Tx Dropped needs to be maintained elsewhere */ | 3043 | /* Tx Dropped needs to be maintained elsewhere */ |
3047 | 3044 | ||
3048 | /* Phy Stats */ | ||
3049 | if (hw->phy.media_type == e1000_media_type_copper) { | ||
3050 | if ((adapter->link_speed == SPEED_1000) && | ||
3051 | (!e1e_rphy(hw, PHY_1000T_STATUS, &phy_tmp))) { | ||
3052 | phy_tmp &= PHY_IDLE_ERROR_COUNT_MASK; | ||
3053 | adapter->phy_stats.idle_errors += phy_tmp; | ||
3054 | } | ||
3055 | } | ||
3056 | |||
3057 | /* Management Stats */ | 3045 | /* Management Stats */ |
3058 | adapter->stats.mgptc += er32(MGTPTC); | 3046 | adapter->stats.mgptc += er32(MGTPTC); |
3059 | adapter->stats.mgprc += er32(MGTPRC); | 3047 | adapter->stats.mgprc += er32(MGTPRC); |
@@ -3073,7 +3061,6 @@ static void e1000_phy_read_status(struct e1000_adapter *adapter) | |||
3073 | int ret_val; | 3061 | int ret_val; |
3074 | unsigned long irq_flags; | 3062 | unsigned long irq_flags; |
3075 | 3063 | ||
3076 | |||
3077 | spin_lock_irqsave(&adapter->stats_lock, irq_flags); | 3064 | spin_lock_irqsave(&adapter->stats_lock, irq_flags); |
3078 | 3065 | ||
3079 | if ((er32(STATUS) & E1000_STATUS_LU) && | 3066 | if ((er32(STATUS) & E1000_STATUS_LU) && |