diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2011-05-13 03:19:53 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-06-09 23:32:28 -0400 |
commit | c5caf4825b22957e4ad70fd94316e91ce8cfb51c (patch) | |
tree | cdd685b91226fc8ca16bc3d9278dba3e39d88662 /drivers/net/e1000e | |
parent | 99730e4c13c8344b02dd96108945b48d28c14c25 (diff) |
e1000e: log when swflag is cleared unexpectedly on ICH/PCH devices
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>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r-- | 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 dcd5db5e34e5..dddd0b3dd21b 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) | |||
889 | u32 extcnf_ctrl; | 889 | u32 extcnf_ctrl; |
890 | 890 | ||
891 | extcnf_ctrl = er32(EXTCNF_CTRL); | 891 | extcnf_ctrl = er32(EXTCNF_CTRL); |
892 | extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG; | 892 | |
893 | ew32(EXTCNF_CTRL, extcnf_ctrl); | 893 | if (extcnf_ctrl & E1000_EXTCNF_CTRL_SWFLAG) { |
894 | extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG; | ||
895 | ew32(EXTCNF_CTRL, extcnf_ctrl); | ||
896 | } else { | ||
897 | e_dbg("Semaphore unexpectedly released by sw/fw/hw\n"); | ||
898 | } | ||
894 | 899 | ||
895 | mutex_unlock(&swflag_mutex); | 900 | mutex_unlock(&swflag_mutex); |
896 | } | 901 | } |
@@ -3066,7 +3071,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
3066 | msleep(20); | 3071 | msleep(20); |
3067 | 3072 | ||
3068 | if (!ret_val) | 3073 | if (!ret_val) |
3069 | e1000_release_swflag_ich8lan(hw); | 3074 | mutex_unlock(&swflag_mutex); |
3070 | 3075 | ||
3071 | if (ctrl & E1000_CTRL_PHY_RST) { | 3076 | if (ctrl & E1000_CTRL_PHY_RST) { |
3072 | ret_val = hw->phy.ops.get_cfg_done(hw); | 3077 | ret_val = hw->phy.ops.get_cfg_done(hw); |