提交 8bf7a7b8 编写于 作者: M Mark Rustad 提交者: Jeff Kirsher

ixgbe: Fix CS4227-related semaphore error on reset failure

If the reset never completes, it is necessary to retake the
semaphore before returning, because the caller will release
the semaphore.
Signed-off-by: NMark Rustad <mark.d.rustad@intel.com>
Tested-by: NDarin Miller <darin.j.miller@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 72bfd32d
...@@ -198,6 +198,7 @@ static s32 ixgbe_write_pe(struct ixgbe_hw *hw, u8 reg, u8 value) ...@@ -198,6 +198,7 @@ static s32 ixgbe_write_pe(struct ixgbe_hw *hw, u8 reg, u8 value)
* ixgbe_reset_cs4227 - Reset CS4227 using port expander * ixgbe_reset_cs4227 - Reset CS4227 using port expander
* @hw: pointer to hardware structure * @hw: pointer to hardware structure
* *
* This function assumes that the caller has acquired the proper semaphore.
* Returns error code * Returns error code
*/ */
static s32 ixgbe_reset_cs4227(struct ixgbe_hw *hw) static s32 ixgbe_reset_cs4227(struct ixgbe_hw *hw)
...@@ -296,6 +297,14 @@ static void ixgbe_check_cs4227(struct ixgbe_hw *hw) ...@@ -296,6 +297,14 @@ static void ixgbe_check_cs4227(struct ixgbe_hw *hw)
hw->mac.ops.release_swfw_sync(hw, swfw_mask); hw->mac.ops.release_swfw_sync(hw, swfw_mask);
msleep(IXGBE_CS4227_CHECK_DELAY); msleep(IXGBE_CS4227_CHECK_DELAY);
} }
/* If still pending, assume other instance failed. */
if (retry == IXGBE_CS4227_RETRIES) {
status = hw->mac.ops.acquire_swfw_sync(hw, swfw_mask);
if (status) {
hw_err(hw, "semaphore failed with %d\n", status);
return;
}
}
/* Reset the CS4227. */ /* Reset the CS4227. */
status = ixgbe_reset_cs4227(hw); status = ixgbe_reset_cs4227(hw);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册