Re: e1000e NVM corruption issue status

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Brandeburg, Jesse <jesse.brandeburg@...>
Cc: LKML <linux-kernel@...>, Jiri Kosina <jkosina@...>, <agospoda@...>, Ronciak, John <john.ronciak@...>, Allan, Bruce W <bruce.w.allan@...>, Graham, David <david.graham@...>, <kkiel@...>, <tglx@...>, <chris.jones@...>, <arjan@...>
Date: Thursday, September 25, 2008 - 10:10 pm

e1000e: fix lockdep issues

From: Jesse Brandeburg <jesse.brandeburg@intel.com>

thanks to tglx, we're finding some interesting lockdep issues.
The good news is that this patch fixes all the ones I
could find, without damaging any functionality.

CC: Thomas Gleixner <tglx@linutronix.de>

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
---

 drivers/net/e1000e/ethtool.c |    6 +++++-
 drivers/net/e1000e/netdev.c  |   13 -------------
 2 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index e21c9e0..f3b49f6 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -432,6 +432,10 @@ static void e1000_get_regs(struct net_device *netdev,
 	regs_buff[11] = er32(TIDV);
 
 	regs_buff[12] = adapter->hw.phy.type;  /* PHY type (IGP=1, M88=0) */
+
+	/* ethtool doesn't use anything past this point, so all this
+	 * code is likely legacy junk for apps that may or may not
+	 * exist */
 	if (hw->phy.type == e1000_phy_m88) {
 		e1e_rphy(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
 		regs_buff[13] = (u32)phy_data; /* cable length */
@@ -447,7 +451,7 @@ static void e1000_get_regs(struct net_device *netdev,
 		regs_buff[22] = adapter->phy_stats.receive_errors;
 		regs_buff[23] = regs_buff[13]; /* mdix mode */
 	}
-	regs_buff[21] = adapter->phy_stats.idle_errors;  /* phy idle errors */
+	regs_buff[21] = 0; /* was idle_errors */
 	e1e_rphy(hw, PHY_1000T_STATUS, &phy_data);
 	regs_buff[24] = (u32)phy_data;  /* phy local receiver status */
 	regs_buff[25] = regs_buff[24];  /* phy remote receiver status */
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 1756be4..235c014 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)
 	struct e1000_hw *hw = &adapter->hw;
 	struct pci_dev *pdev = adapter->pdev;
 	unsigned long irq_flags;
-	u16 phy_tmp;
-
-#define PHY_IDLE_ERROR_COUNT_MASK 0x00FF
 
 	/*
 	 * Prevent stats update while adapter is being reset, or if the pci
@@ -3045,15 +3042,6 @@ void e1000e_update_stats(struct e1000_adapter *adapter)
 
 	/* Tx Dropped needs to be maintained elsewhere */
 
-	/* Phy Stats */
-	if (hw->phy.media_type == e1000_media_type_copper) {
-		if ((adapter->link_speed == SPEED_1000) &&
-		   (!e1e_rphy(hw, PHY_1000T_STATUS, &phy_tmp))) {
-			phy_tmp &= PHY_IDLE_ERROR_COUNT_MASK;
-			adapter->phy_stats.idle_errors += phy_tmp;
-		}
-	}
-
 	/* Management Stats */
 	adapter->stats.mgptc += er32(MGTPTC);
 	adapter->stats.mgprc += er32(MGTPRC);
@@ -3073,7 +3061,6 @@ static void e1000_phy_read_status(struct e1000_adapter *adapter)
 	int ret_val;
 	unsigned long irq_flags;
 
-
 	spin_lock_irqsave(&adapter->stats_lock, irq_flags);
 
 	if ((er32(STATUS) & E1000_STATUS_LU) &&
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 9:50 pm)
Re: e1000e NVM corruption issue status, James Courtier-Dutton, (Sat Oct 18, 3:13 pm)
Re: e1000e NVM corruption issue status, Jiri Kosina, (Sat Oct 18, 6:49 pm)
Re: e1000e NVM corruption issue status, Karsten Keil, (Fri Sep 26, 3:19 am)
Re: e1000e NVM corruption issue status, Jesse Brandeburg, (Fri Sep 26, 1:44 am)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:01 pm)
Re: e1000e NVM corruption issue status, Karsten Keil, (Fri Sep 26, 10:23 am)
Re: e1000e NVM corruption issue status, Jiri Kosina, (Fri Sep 26, 2:13 am)
Re: e1000e NVM corruption issue status, Arjan van de Ven, (Fri Sep 26, 7:49 am)
Re: e1000e NVM corruption issue status, Jesse Barnes, (Fri Sep 26, 1:52 pm)
Re: e1000e NVM corruption issue status, Jesse Barnes, (Fri Sep 26, 2:23 pm)
Re: e1000e NVM corruption issue status, Tim Gardner, (Fri Sep 26, 2:53 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Fri Sep 26, 8:05 pm)
Re: e1000e NVM corruption issue status, Tim Gardner, (Sat Sep 27, 12:20 am)
Re: e1000e NVM corruption issue status, Krzysztof Halasa, (Fri Sep 26, 6:04 pm)
RE: e1000e NVM corruption issue status, Brandeburg, Jesse, (Fri Sep 26, 6:23 pm)
Re: e1000e NVM corruption issue status, Krzysztof Halasa, (Sat Sep 27, 2:45 pm)
Re: e1000e NVM corruption issue status, Jesse Barnes, (Fri Sep 26, 2:39 pm)
Re: e1000e NVM corruption issue status, Jesse Barnes, (Fri Sep 26, 2:43 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:13 pm)
Re: e1000e NVM corruption issue status, Jiri Kosina, (Mon Sep 29, 11:52 am)
Re: e1000e NVM corruption issue status, Jiri Kosina, (Mon Sep 29, 12:20 pm)
RE: e1000e NVM corruption issue status, Brandeburg, Jesse, (Mon Sep 29, 12:24 pm)
RE: e1000e NVM corruption issue status, Jiri Kosina, (Mon Sep 29, 1:18 pm)
RE: e1000e NVM corruption issue status, Jiri Kosina, (Mon Sep 29, 1:36 pm)
RE: e1000e NVM corruption issue status, Jiri Kosina, (Mon Sep 29, 6:43 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:13 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:12 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:12 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:11 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:11 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:10 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:10 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:10 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:09 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:09 pm)
Re: e1000e NVM corruption issue status, Ingo Molnar, (Fri Sep 26, 3:12 am)
Re: e1000e NVM corruption issue status, Chris Snook, (Thu Sep 25, 9:58 pm)
Re: e1000e NVM corruption issue status, Brandeburg, Jesse, (Thu Sep 25, 10:04 pm)