Re: BUG: bad unlock balance detected! e1000e

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Frederik Deweerdt
Date: Tuesday, December 9, 2008 - 4:43 pm

On Tue, Dec 09, 2008 at 03:08:01PM -0800, Andrew Morton wrote:
Yep, sorry.
I don't think so, e1000_acquire_swflag_ich8lan() locks and
e1000_release_swflag_ich8lan() unlocks. I think it is more along the
lines of:


diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index 523b971..f971b83 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -1892,7 +1892,13 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)
 		 */
 		ctrl |= E1000_CTRL_PHY_RST;
 	}
+
 	ret_val = e1000_acquire_swflag_ich8lan(hw);
+	if (ret_val) {
+		hw_dbg(hw, "Failed to acquire NVM swflag");
+		return ret_val;
+	}
+
 	hw_dbg(hw, "Issuing a global reset to ich8lan");
 	ew32(CTRL, (ctrl | E1000_CTRL_RST));
 	msleep(20);


But I'm not sure we should cancel the ongoing reset if the card times
out... 


Regards,
Frederik

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: BUG: bad unlock balance detected! e1000e, Andrew Morton, (Tue Dec 9, 4:08 pm)
Re: BUG: bad unlock balance detected! e1000e, Frederik Deweerdt, (Tue Dec 9, 4:43 pm)
Re: BUG: bad unlock balance detected! e1000e, Andrew Morton, (Tue Dec 9, 4:56 pm)