Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4740907pxj; Wed, 9 Jun 2021 00:15:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy72Af2pJoferUsz7pZFJxCNkOFA1Ei+5L+q/uXhN2ujpmOp/mqkwMPAR8u4NhobZizGMpz X-Received: by 2002:aa7:cc19:: with SMTP id q25mr28684214edt.56.1623222907132; Wed, 09 Jun 2021 00:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623222907; cv=none; d=google.com; s=arc-20160816; b=wTRCCmeuHeebjKnOr25xwZ1XA47relyeETvmLEI6K3ZcGkBoz9hvBcqW0YAxBo3cHa fKHG8Xank/6EjG4Q1wHy4FAYqBgttDbISBgh9IJD4VJeTlqcLJZ1jkvmyGIw44m/xroi hlSZm5+dBDJ3cc5XLelXQzvv7HGACdENP/lUbhDerXOMaE1dE1tK/RnIn4U8XxAlPDYj Qxpe9AfOTTQJHF2wj9ahUerc0HFim7dBxWlxeyri9Hu4xpiQShseqmJk6EMVY4pAyr3d wHsFhD/ZUbi5F82xXc+wy/ibVz2PEes0/WfqIINy6lcsZJlUx9xn0j4YpMXExfw07A+P x+pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=T1EorgJAZiUh647IrenlEGC2Cz70romg7CwoJ+82YTQ=; b=F56uHTAkMcYuCmJTRl3mAk7Tf4T3MxLJzAjDSa2gGp5uViZRA3wEg1AAo+vpiLidjk Xiq+FwnZBIx80D1jbd2c1xmj1y+gbgDdWIy5zt8wqycj2W9qnx+dGqn3CWVtI7IxHFOR qpIq3kUM01sn2kDCvLvPy1gBByBTfudirKWyOPcGcOViVqZ+S+XJhGbofknNdCrBp9k9 SSZVNx9l+MGHdicU4bhiMxFOJqsy6YMOOytmdUoV/mUL3t+TebcG//I1niLQ8L24HS+C PDGjbaGoKstRmJUNYFEgz5rioB3QOJkTFtETFjKilupCWlgRxRys3R47vFMqgDNcY2R+ sXdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LgMRBdtu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f8si1819026edr.154.2021.06.09.00.14.43; Wed, 09 Jun 2021 00:15:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LgMRBdtu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234519AbhFHSs6 (ORCPT + 99 others); Tue, 8 Jun 2021 14:48:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:42400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234508AbhFHSn2 (ORCPT ); Tue, 8 Jun 2021 14:43:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6872161443; Tue, 8 Jun 2021 18:36:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623177364; bh=ELVduVGUT1mmYkpSHCdRsHVj1u32QXnWg+JdOzcSc1w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LgMRBdtu+V5uH2YNOB5U7OvsCvGia2VE/bXg2rPLA/uppxb63p5DySblUCHNKRSab BODOe9NFaxgHCXcqjzmqKQ8c9r1w2fgrqKJbDoBknV5RB4iSbj44Qsw+eVZbyZRgZR DRUyIX6uymopM1pDIC1BAiJpbanX3ZxhlZZjiObQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brett Creeley , Konrad Jankowski , Tony Nguyen , Sasha Levin Subject: [PATCH 5.4 25/78] ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared Date: Tue, 8 Jun 2021 20:26:54 +0200 Message-Id: <20210608175936.119759117@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175935.254388043@linuxfoundation.org> References: <20210608175935.254388043@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Brett Creeley [ Upstream commit 8679f07a9922068b9b6be81b632f52cac45d1b91 ] 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 Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- 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 9138b19de87e..f2bb83af4d9e 100644 --- a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h +++ b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h @@ -34,6 +34,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 360c0f7e0384..5e97fdca5fab 100644 --- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c @@ -384,13 +384,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. -- 2.30.2