From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: "Akeem G. Abodunrin" <akeem.g.abodunrin@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 03/12] e1000e: Release mutex lock only if it has been initially acquired
Date: Tue, 21 May 2013 15:03:11 -0700 [thread overview]
Message-ID: <1369173800-20326-4-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1369173800-20326-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: "Akeem G. Abodunrin" <akeem.g.abodunrin@intel.com>
This patch fixes the issue of unlocking swflag_mutex for 82574 and 82583
devices regardless of if the hw semaphore has been successfully acquired via
e1000_get_hw_semaphore_82574(). With this patch, unlocking mutex now depends
on if the hw semaphore was successfully acquired before. And 82574/82583
devices are reset regardless of whether e1000_get_hw_semaphore_82574()
returns success or failure.
Reported-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/e1000e/82571.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c
index bef2f10..4c303e2 100644
--- a/drivers/net/ethernet/intel/e1000e/82571.c
+++ b/drivers/net/ethernet/intel/e1000e/82571.c
@@ -1003,8 +1003,6 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
default:
break;
}
- if (ret_val)
- e_dbg("Cannot acquire MDIO ownership\n");
ctrl = er32(CTRL);
@@ -1015,7 +1013,9 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
switch (hw->mac.type) {
case e1000_82574:
case e1000_82583:
- e1000_put_hw_semaphore_82574(hw);
+ /* Release mutex only if the hw semaphore is acquired */
+ if (!ret_val)
+ e1000_put_hw_semaphore_82574(hw);
break;
default:
break;
--
1.7.11.7
next prev parent reply other threads:[~2013-05-21 22:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 22:03 [net-next 00/12][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-05-21 22:03 ` [net-next 01/12] e1000e: cleanup whitespace Jeff Kirsher
2013-05-21 22:03 ` [net-next 02/12] e1000e: prevent warning from -Wunused-parameter Jeff Kirsher
2013-05-21 22:03 ` Jeff Kirsher [this message]
2013-05-21 22:03 ` [net-next 04/12] igb: Changed LEDs blink mechanism to include designs using cathode Jeff Kirsher
2013-05-21 22:03 ` [net-next 05/12] igb: Add update to last_rx_timestamp in Rx rings Jeff Kirsher
2013-05-21 22:03 ` [net-next 06/12] igb: Support for SFP modules discovery Jeff Kirsher
2013-05-21 22:03 ` [net-next 07/12] igb: SerDes flow control setting Jeff Kirsher
2013-05-21 22:03 ` [net-next 08/12] igb: Fix set_ethtool function to call update nvm for entire image Jeff Kirsher
2013-05-21 22:03 ` [net-next 09/12] igb: Fix possible panic caused by Rx traffic arrival while interface is down Jeff Kirsher
2013-05-21 22:03 ` [net-next 10/12] igb: Implementation of i210/i211 LED support Jeff Kirsher
2013-05-21 22:03 ` [net-next 11/12] igb: Removed unused i2c function Jeff Kirsher
2013-05-21 22:03 ` [net-next 12/12] IXGBE: Set the SW prio_tc values at initialization to the HW setting Jeff Kirsher
2013-05-22 20:57 ` [net-next 00/12][pull request] Intel Wired LAN Driver Updates David Miller
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=1369173800-20326-4-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=akeem.g.abodunrin@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
/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).