netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Bruce Allan <bruce.w.allan@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 03/12] e1000e: log when swflag is cleared unexpectedly on ICH/PCH devices
Date: Wed,  8 Jun 2011 15:56:31 -0700	[thread overview]
Message-ID: <1307573800-24868-4-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1307573800-24868-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Bruce Allan <bruce.w.allan@intel.com>

Since EXTCNF_CTRL.SWFLAG (used in the ownership arbitration of shared
resources, e.g. the PHY shared between the s/w, f/w, and h/w clients)
can be cleared by any of those clients, log a debug message when
software attempts to clear it and it is already cleared unexpectedly.
And since the swflag is cleared by a hardware reset, the driver does
not need to do that, but the mutex acquired when the bit is set must
still be cleared.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/e1000e/ich8lan.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index dcd5db5..dddd0b3 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -889,8 +889,13 @@ static void e1000_release_swflag_ich8lan(struct e1000_hw *hw)
 	u32 extcnf_ctrl;
 
 	extcnf_ctrl = er32(EXTCNF_CTRL);
-	extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG;
-	ew32(EXTCNF_CTRL, extcnf_ctrl);
+
+	if (extcnf_ctrl & E1000_EXTCNF_CTRL_SWFLAG) {
+		extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG;
+		ew32(EXTCNF_CTRL, extcnf_ctrl);
+	} else {
+		e_dbg("Semaphore unexpectedly released by sw/fw/hw\n");
+	}
 
 	mutex_unlock(&swflag_mutex);
 }
@@ -3066,7 +3071,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)
 	msleep(20);
 
 	if (!ret_val)
-		e1000_release_swflag_ich8lan(hw);
+		mutex_unlock(&swflag_mutex);
 
 	if (ctrl & E1000_CTRL_PHY_RST) {
 		ret_val = hw->phy.ops.get_cfg_done(hw);
-- 
1.7.5.2


  parent reply	other threads:[~2011-06-08 22:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-08 22:56 [net-next 00/12][pull request] Intel Wired LAN Driver Update Jeff Kirsher
2011-06-08 22:56 ` [net-next 01/12] e1000e: disable far-end loopback mode on ESB2 Jeff Kirsher
2011-06-08 22:56 ` [net-next 02/12] e1000e: 82579 intermittently disabled during S0->Sx Jeff Kirsher
2011-06-08 22:56 ` Jeff Kirsher [this message]
2011-06-08 22:56 ` [net-next 04/12] e1000e: do not schedule the Tx queue until ready Jeff Kirsher
2011-06-08 22:56 ` [net-next 05/12] e1000e: access multiple PHY registers on same page at the same time Jeff Kirsher
2011-06-08 22:56 ` [net-next 06/12] e1000e: Clear host wakeup bit on 82577/8 without touching PHY page 800 Jeff Kirsher
2011-06-08 22:56 ` [net-next 07/12] e1000e: remove redundant reverse dependency on CRC32 Jeff Kirsher
2011-06-08 22:56 ` [net-next 08/12] e1000e: update driver version Jeff Kirsher
2011-06-08 22:56 ` [net-next 09/12] igbvf: update version number Jeff Kirsher
2011-06-08 22:56 ` [net-next 10/12] igb: Change version to remove number after -k in kernel versions Jeff Kirsher
2011-06-08 22:56 ` [net-next 11/12] rtnetlink: Compute and store minimum ifinfo dump size Jeff Kirsher
2011-06-08 22:56 ` [net-next 12/12] ixgbevf: Update the driver string Jeff Kirsher
2011-06-09  7:05 ` [net-next 00/12][pull request] Intel Wired LAN Driver Update David Miller
2011-06-09  7:08   ` David Miller
2011-06-09  7:46     ` Jeff Kirsher
2011-06-09  7:50       ` David Miller
2011-06-09  7:53         ` Jeff Kirsher
2011-06-09  7:58           ` David Miller
2011-06-09  8:06             ` Jeff Kirsher
2011-06-09  8:14             ` Jeff Kirsher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307573800-24868-4-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=bruce.w.allan@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).