mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
ice: Put __ICE_PREPARED_FOR_RESET check in ice_prepare_for_reset
[ Upstream commit 5abac9d7e1 ]
Currently we check if the __ICE_PREPARED_FOR_RESET bit is set prior to
calling ice_prepare_for_reset in ice_reset_subtask(), but we aren't
checking that bit in ice_do_reset() before calling
ice_prepare_for_reset(). This is not consistent and can cause issues if
ice_prepare_for_reset() is called prior to ice_do_reset(). Fix this by
checking if the __ICE_PREPARED_FOR_RESET bit is set internal to
ice_prepare_for_reset().
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9743153206
commit
2cfe5e42e0
@@ -342,6 +342,10 @@ ice_prepare_for_reset(struct ice_pf *pf)
|
||||
{
|
||||
struct ice_hw *hw = &pf->hw;
|
||||
|
||||
/* already prepared for reset */
|
||||
if (test_bit(__ICE_PREPARED_FOR_RESET, pf->state))
|
||||
return;
|
||||
|
||||
/* Notify VFs of impending reset */
|
||||
if (ice_check_sq_alive(hw, &hw->mailboxq))
|
||||
ice_vc_notify_reset(pf);
|
||||
@@ -424,8 +428,7 @@ static void ice_reset_subtask(struct ice_pf *pf)
|
||||
/* return if no valid reset type requested */
|
||||
if (reset_type == ICE_RESET_INVAL)
|
||||
return;
|
||||
if (!test_bit(__ICE_PREPARED_FOR_RESET, pf->state))
|
||||
ice_prepare_for_reset(pf);
|
||||
ice_prepare_for_reset(pf);
|
||||
|
||||
/* make sure we are ready to rebuild */
|
||||
if (ice_check_reset(&pf->hw)) {
|
||||
|
||||
Reference in New Issue
Block a user