lkml.org 
[lkml]   [2021]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 438/663] i40e: Fix VFs not created
    Date
    From: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>

    [ Upstream commit dc8812626440fa6a27f1f3f654f6dc435e042e42 ]

    When creating VFs they were sometimes not getting resources.
    It was caused by not executing i40e_reset_all_vfs due to
    flag __I40E_VF_DISABLE being set on PF. Because of this
    IAVF was never able to finish setup sequence never
    getting reset indication from PF.
    Changed test_and_set_bit __I40E_VF_DISABLE in
    i40e_sync_filters_subtask to test_bit and removed clear_bit.
    This function should not set this bit it should only check
    if it hasn't been already set.

    Fixes: a7542b876075 ("i40e: check __I40E_VF_DISABLE bit in i40e_sync_filters_subtask")
    Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
    Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
    index b268adb3e1d44..3ca5644785556 100644
    --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
    +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
    @@ -2616,7 +2616,7 @@ static void i40e_sync_filters_subtask(struct i40e_pf *pf)
    return;
    if (!test_and_clear_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state))
    return;
    - if (test_and_set_bit(__I40E_VF_DISABLE, pf->state)) {
    + if (test_bit(__I40E_VF_DISABLE, pf->state)) {
    set_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state);
    return;
    }
    @@ -2634,7 +2634,6 @@ static void i40e_sync_filters_subtask(struct i40e_pf *pf)
    }
    }
    }
    - clear_bit(__I40E_VF_DISABLE, pf->state);
    }

    /**
    --
    2.27.0


    \
     
     \ /
      Last update: 2021-03-02 04:40    [W:4.197 / U:0.152 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site