login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
October
»
3
Re: [PATCH 2.6.27-rc8 4/6] e1000e: drop stats lock
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Thomas Gleixner
Subject:
Re: [PATCH 2.6.27-rc8 4/6] e1000e: drop stats lock
Date: Thursday, October 2, 2008 - 5:38 pm
On Thu, 2 Oct 2008, Jesse Brandeburg wrote:
quoted text
> 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> > CC: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
quoted text
> --- > > drivers/net/e1000e/e1000.h | 1 - > drivers/net/e1000e/netdev.c | 18 ------------------ > 2 files changed, 0 insertions(+), 19 deletions(-) > > diff --git a/drivers/net/e1000e/e1000.h b/drivers/net/e1000e/e1000.h > index 8087bda..5ea6b60 100644 > --- a/drivers/net/e1000e/e1000.h > +++ b/drivers/net/e1000e/e1000.h > @@ -257,7 +257,6 @@ struct e1000_adapter { > struct net_device *netdev; > struct pci_dev *pdev; > struct net_device_stats net_stats; > - spinlock_t stats_lock; /* prevent concurrent stats updates */ > > /* structs defined in e1000_hw.h */ > struct e1000_hw hw; > diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c > index 835b692..01e9558 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) > /* Explicitly disable IRQ since the NIC can be in any state. */ > e1000_irq_disable(adapter); > > - spin_lock_init(&adapter->stats_lock); > - > set_bit(__E1000_DOWN, &adapter->state); > return 0; > > @@ -2953,7 +2951,6 @@ void e1000e_update_stats(struct e1000_adapter *adapter) > { > struct e1000_hw *hw = &adapter->hw; > struct pci_dev *pdev = adapter->pdev; > - unsigned long irq_flags; > > /* > * Prevent stats update while adapter is being reset, or if the pci > @@ -2964,14 +2961,6 @@ void e1000e_update_stats(struct e1000_adapter *adapter) > if (pci_channel_offline(pdev)) > return; > > - spin_lock_irqsave(&adapter->stats_lock, irq_flags); > - > - /* > - * these counters are modified from e1000_adjust_tbi_stats, > - * called from the interrupt context, so they must only > - * be written while holding adapter->stats_lock > - */ > - > adapter->stats.crcerrs += er32(CRCERRS); > adapter->stats.gprc += er32(GPRC); > adapter->stats.gorc += er32(GORCL); > @@ -3046,8 +3035,6 @@ void e1000e_update_stats(struct e1000_adapter *adapter) > adapter->stats.mgptc += er32(MGTPTC); > adapter->stats.mgprc += er32(MGTPRC); > adapter->stats.mgpdc += er32(MGTPDC); > - > - spin_unlock_irqrestore(&adapter->stats_lock, irq_flags); > } > > /** > @@ -3059,9 +3046,6 @@ static void e1000_phy_read_status(struct e1000_adapter *adapter) > struct e1000_hw *hw = &adapter->hw; > struct e1000_phy_regs *phy = &adapter->phy_regs; > int ret_val; > - unsigned long irq_flags; > - > - spin_lock_irqsave(&adapter->stats_lock, irq_flags); > > if ((er32(STATUS) & E1000_STATUS_LU) && > (adapter->hw.phy.media_type == e1000_media_type_copper)) { > @@ -3092,8 +3076,6 @@ static void e1000_phy_read_status(struct e1000_adapter *adapter) > phy->stat1000 = 0; > phy->estatus = (ESTATUS_1000_TFULL | ESTATUS_1000_THALF); > } > - > - spin_unlock_irqrestore(&adapter->stats_lock, irq_flags); > } > > static void e1000_print_link_info(struct e1000_adapter *adapter) >
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 2.6.27-rc8 0/6] e1000e mutex protection
, Jesse Brandeburg
, (Thu Oct 2, 4:33 pm)
[PATCH 2.6.27-rc8 1/6] e1000e: reset swflag after resettin ...
, Jesse Brandeburg
, (Thu Oct 2, 4:33 pm)
[PATCH 2.6.27-rc8 2/6] e1000e: do not ever sleep in interr ...
, Jesse Brandeburg
, (Thu Oct 2, 4:33 pm)
[PATCH 2.6.27-rc8 3/6] e1000e: remove phy read from inside ...
, Jesse Brandeburg
, (Thu Oct 2, 4:33 pm)
[PATCH 2.6.27-rc8 4/6] e1000e: drop stats lock
, Jesse Brandeburg
, (Thu Oct 2, 4:33 pm)
[PATCH 2.6.27-rc8 5/6] e1000e: debug contention on NVM SWFLAG
, Jesse Brandeburg
, (Thu Oct 2, 4:33 pm)
[PATCH 2.6.27-rc8 6/6] e1000e: update version from k4 to k6
, Jesse Brandeburg
, (Thu Oct 2, 4:33 pm)
Re: [PATCH 2.6.27-rc8 2/6] e1000e: do not ever sleep in in ...
, Thomas Gleixner
, (Thu Oct 2, 5:36 pm)
Re: [PATCH 2.6.27-rc8 3/6] e1000e: remove phy read from in ...
, Thomas Gleixner
, (Thu Oct 2, 5:37 pm)
Re: [PATCH 2.6.27-rc8 4/6] e1000e: drop stats lock
, Thomas Gleixner
, (Thu Oct 2, 5:38 pm)
Re: [PATCH 2.6.27-rc8 5/6] e1000e: debug contention on NVM ...
, Jiri Kosina
, (Fri Oct 3, 4:47 am)
Re: [PATCH 2.6.27-rc8 5/6] e1000e: debug contention on NVM ...
, Linus Torvalds
, (Fri Oct 3, 8:16 am)
Re: [PATCH 2.6.27-rc8 5/6] e1000e: debug contention on NVM ...
, Jiri Kosina
, (Fri Oct 3, 8:39 am)
Re: [PATCH 2.6.27-rc8 5/6] e1000e: debug contention on NVM ...
, Thomas Gleixner
, (Fri Oct 3, 12:38 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Dave Jones
Re: OT: character encodings (was: Linux 2.6.20-rc4)
Greg Kroah-Hartman
[PATCH 17/36] sysdev: detect multiple driver registrations
Sam Ravnborg
Re: [PATCH] kbuild: fix make V=1
Nick Piggin
Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
Cong Wang
Re: [v2 Patch 3/3] bonding: make bonding support netpoll
git
:
Stephen R. van den Berg
Re: [RFC] origin link for cherry-pick and revert
Junio C Hamano
Re: [PATCH 1/2] Teach git-describe to display distances from tags.
Johannes Schindelin
Re: [PATCH 2/2] git-svn: support fetch with autocrlf on
Junio C Hamano
Re: [PATCH 6/6] Teach core object handling functions about gitlinks
James Henstridge
Re: VCS comparison table
linux-netdev
:
Jarek Poplawski
Re: [PATCH] flush_work_sync vs. flush_scheduled_work Re: [PATCH] PHYLIB: IRQ event...
Lennert Buytenhek
Re: Distributed Switch Architecture(DSA)
Daniel Schaffrath
Re: tcp bw in 2.6
Guo-Fu Tseng
Re: jme: UDP checksum error, and lots of them
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
openbsd-misc
:
Claudio Jeker
Re: Vlan Tag on Vlan Tag (l2tunneling)
Josh Grosse
ssh/sshd challenge-response seems to have stopped working in -current
Pieter Verberne
File collision while using pkg_add
Tomas Bodzar
bsd: uvm_mapent_alloc: out of static map entries
Community First Financial
Teacher A+ Loan
git-commits-head
:
Linux Kernel Mailing List
ath9k: Added get_survey callback in order to get channel noise
Linux Kernel Mailing List
tracing: protect reader of cmdline output
Linux Kernel Mailing List
kconfig: recalc symbol value before showing search results
Linux Kernel Mailing List
[ARM] 5185/1: Fix spi num_chipselect for lubbock
Linux Kernel Mailing List
swsusp: provide users with a hint about the no_console_suspend option
Colocation donated by:
Syndicate