From: Mitch Williams Date: Thu, 10 Mar 2016 22:59:46 +0000 (-0800) Subject: i40e: Notify VFs of all resets X-Git-Tag: v4.1.12-92~121^2~84 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=de9123fac6e297556582b3303bbfcac5bf8ac783;p=users%2Fjedix%2Flinux-maple.git i40e: Notify VFs of all resets Orabug: 23176970 Notify VFs in the reset interrupt handler, instead of the actual reset initiation code. This allows the VFs to get properly notified for all resets, including resets initiated by different PFs on the same physical device. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher (cherry picked from commit d3ce57344100023faa8f514eb66dfb110b53629c) Signed-off-by: Brian Maly --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 3a6205b0c22c8..7c02b8caddb8c 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -5495,8 +5495,6 @@ void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags) WARN_ON(in_interrupt()); - if (i40e_check_asq_alive(&pf->hw)) - i40e_vc_notify_reset(pf); /* do the biggest reset indicated */ if (reset_flags & BIT_ULL(__I40E_GLOBAL_RESET_REQUESTED)) { @@ -6699,6 +6697,8 @@ static void i40e_prep_for_reset(struct i40e_pf *pf) clear_bit(__I40E_RESET_INTR_RECEIVED, &pf->state); if (test_and_set_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state)) return; + if (i40e_check_asq_alive(&pf->hw)) + i40e_vc_notify_reset(pf); dev_dbg(&pf->pdev->dev, "Tearing down internal switch for reset\n");