All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jankowski, Konrad0 <konrad0.jankowski@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net 02/13] ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared
Date: Wed, 21 Apr 2021 19:18:12 +0000	[thread overview]
Message-ID: <CY4PR11MB1576C3639340B840902B7DFCAB479@CY4PR11MB1576.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210226211932.46683-2-anthony.l.nguyen@intel.com>



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: pi?tek, 26 lutego 2021 22:19
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net 02/13] ice: Fix VFR issues for AVF
> drivers that expect ATQLEN cleared
> 
> From: Brett Creeley <brett.creeley@intel.com>
> 
> Some AVF drivers expect the VF_MBX_ATQLEN register to be cleared for any
> type of VFR/VFLR. Fix this by clearing the VF_MBX_ATQLEN register at the
> same time as VF_MBX_ARQLEN.
> 
> Fixes: 82ba01282cf8 ("ice: clear VF ARQLEN register on reset")
> Signed-off-by: Brett Creeley <brett.creeley@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_hw_autogen.h  |  1 +
> drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 12 +++++++-----
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
> b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
> index 093a1818a392..1998821896c0 100644
> --- a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
> +++ b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
> @@ -31,6 +31,7 @@
>  #define PF_FW_ATQLEN_ATQOVFL_M			BIT(29)
>  #define PF_FW_ATQLEN_ATQCRIT_M			BIT(30)
>  #define VF_MBX_ARQLEN(_VF)			(0x0022BC00 + ((_VF)
> * 4))
> +#define VF_MBX_ATQLEN(_VF)			(0x0022A800 + ((_VF)
> * 4))
>  #define PF_FW_ATQLEN_ATQENABLE_M		BIT(31)
>  #define PF_FW_ATQT				0x00080400
>  #define PF_MBX_ARQBAH				0x0022E400
> diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
> b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
> index 1f38a8d0c525..0f2a4d48574e 100644
> --- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
> +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
> @@ -435,13 +435,15 @@ static void ice_trigger_vf_reset(struct ice_vf *vf,
> bool is_vflr, bool is_pfr)
>  	 */
>  	clear_bit(ICE_VF_STATE_INIT, vf->vf_states);
> 
> -	/* VF_MBX_ARQLEN is cleared by PFR, so the driver needs to clear it
> -	 * in the case of VFR. If this is done for PFR, it can mess up VF
> -	 * resets because the VF driver may already have started cleanup
> -	 * by the time we get here.
> +	/* VF_MBX_ARQLEN and VF_MBX_ATQLEN are cleared by PFR, so
> the driver
> +	 * needs to clear them in the case of VFR/VFLR. If this is done for
> +	 * PFR, it can mess up VF resets because the VF driver may already
> +	 * have started cleanup by the time we get here.
>  	 */
> -	if (!is_pfr)
> +	if (!is_pfr) {
>  		wr32(hw, VF_MBX_ARQLEN(vf->vf_id), 0);
> +		wr32(hw, VF_MBX_ATQLEN(vf->vf_id), 0);
> +	}
> 
>  	/* In the case of a VFLR, the HW has already reset the VF and we
>  	 * just need to clean up, so don't hit the VFRTRIG register.

Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>

  reply	other threads:[~2021-04-21 19:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26 21:19 [Intel-wired-lan] [PATCH net 01/13] ice: Fix allowing VF to request more/less queues via virtchnl Tony Nguyen
2021-02-26 21:19 ` [Intel-wired-lan] [PATCH net 02/13] ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared Tony Nguyen
2021-04-21 19:18   ` Jankowski, Konrad0 [this message]
2021-02-26 21:19 ` [Intel-wired-lan] [PATCH net 03/13] ice: Continue probe on link/PHY errors Tony Nguyen
2021-03-10 21:14   ` Brelinski, TonyX
2021-02-26 21:19 ` [Intel-wired-lan] [PATCH net 04/13] ice: Fix VF true promiscuous mode Tony Nguyen
2021-02-26 21:19 ` [Intel-wired-lan] [PATCH net 05/13] ice: Increase control queue timeout Tony Nguyen
2021-03-09 23:45   ` Brelinski, TonyX
2021-02-26 21:19 ` [Intel-wired-lan] [PATCH net 06/13] ice: Recognize 860 as iSCSI port in CEE mode Tony Nguyen
2021-03-23 22:41   ` Brelinski, TonyX
2021-02-26 21:19 ` [Intel-wired-lan] [PATCH net 07/13] ice: prevent ice_open and ice_stop during reset Tony Nguyen
2021-03-11 22:50   ` Brelinski, TonyX
2021-02-26 21:19 ` [Intel-wired-lan] [PATCH net 08/13] ice: fix memory allocation call Tony Nguyen
2021-03-09 23:47   ` Brelinski, TonyX
2021-02-26 21:19 ` [Intel-wired-lan] [PATCH net 09/13] ice: remove DCBNL_DEVRESET bit from PF state Tony Nguyen
2021-03-22 23:58   ` Brelinski, TonyX
2021-02-26 21:19 ` [Intel-wired-lan] [PATCH net 10/13] ice: Fix for dereference of NULL pointer Tony Nguyen
2021-03-09 23:49   ` Brelinski, TonyX
2021-02-26 21:19 ` [Intel-wired-lan] [PATCH net 11/13] ice: Use port number instead of PF ID for WoL Tony Nguyen
2021-03-10 23:06   ` Brelinski, TonyX
2021-02-26 21:19 ` [Intel-wired-lan] [PATCH net 12/13] ice: handle the VF VSI rebuild failure Tony Nguyen
2021-04-21 19:17   ` Jankowski, Konrad0
2021-02-26 21:19 ` [Intel-wired-lan] [PATCH net 13/13] ice: Cleanup fltr list in case of allocation issues Tony Nguyen
2021-03-09 23:51   ` Brelinski, TonyX
2021-04-19 19:21 ` [Intel-wired-lan] [PATCH net 01/13] ice: Fix allowing VF to request more/less queues via virtchnl Jankowski, Konrad0

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CY4PR11MB1576C3639340B840902B7DFCAB479@CY4PR11MB1576.namprd11.prod.outlook.com \
    --to=konrad0.jankowski@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.