From patchwork Tue Jan 25 18:56:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Chopra X-Patchwork-Id: 536766 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FE93C433F5 for ; Tue, 25 Jan 2022 18:58:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231522AbiAYS5e (ORCPT ); Tue, 25 Jan 2022 13:57:34 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:14222 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232897AbiAYS47 (ORCPT ); Tue, 25 Jan 2022 13:56:59 -0500 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20PDQuJK029163; Tue, 25 Jan 2022 10:56:58 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=kh8pGo1C1CdeIgY3h3mqcD43Q8Pk2XMUOQuTwYoONzw=; b=XAHBNh4B+e/QcyNGfAd8i4gwLsFdc6ncAbyUUmSsc7sXRmsrdxkLBrBBI/A/LakBNqoX zdUh5PsgUvd/ThINtxYSdjebEB5mRxK3svAScoypDpx6WrLuAYGGpAzGDHj+GBdxzlU9 tAKqYkhlhxoCuaWc/XfnMXkMI+W1H+k1cvP5esxpJShxuvUV1rDZ8feC6lalMMpdeZgv x+QUNVoq56Kuh6Gr8urFULpHg1QlZ05nxaEPn62yGzHMzvt09W9XGYqkC921XiGZm8Hs Ku+3/g74Dtmd0Txzs9caL0D9YqQFIHMTlOHvIyPxc4FX2dW9AAGBCS1edKuCMMsOY01O dQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3dtj3nh921-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 25 Jan 2022 10:56:58 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 25 Jan 2022 10:56:56 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 25 Jan 2022 10:56:56 -0800 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 8FDBF5E6867; Tue, 25 Jan 2022 10:56:56 -0800 (PST) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 20PIupdB026619; Tue, 25 Jan 2022 10:56:51 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 20PIuh5U026618; Tue, 25 Jan 2022 10:56:43 -0800 From: Manish Chopra To: CC: , , Subject: [PATCH stable 5.15 2/2] bnx2x: Invalidate fastpath HSI version for VFs Date: Tue, 25 Jan 2022 10:56:20 -0800 Message-ID: <20220125185620.26570-2-manishc@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20220125185620.26570-1-manishc@marvell.com> References: <20220125185620.26570-1-manishc@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: lkzBg417FBuyjpm2sJzHKRhJG1-z1Tk8 X-Proofpoint-ORIG-GUID: lkzBg417FBuyjpm2sJzHKRhJG1-z1Tk8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-25_03,2022-01-25_02,2021-12-02_01 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org commit 802d4d207e75d7208ff75adb712b556c1e91cf1c upstream Commit 0a6890b9b4df ("bnx2x: Utilize FW 7.13.15.0.") added validation for fastpath HSI versions for different client init which was not meant for SR-IOV VF clients, which resulted in firmware asserts when running VF clients with different fastpath HSI version. This patch along with the new firmware support in patch #1 fixes this behavior in order to not validate fastpath HSI version for the VFs. Fixes: 0a6890b9b4df ("bnx2x: Utilize FW 7.13.15.0.") Signed-off-by: Manish Chopra Signed-off-by: Prabhakar Kushwaha Signed-off-by: Alok Prasad Signed-off-by: Ariel Elior Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c index 9c2f51f..052f7ff 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c @@ -758,9 +758,18 @@ static void bnx2x_vf_igu_reset(struct bnx2x *bp, struct bnx2x_virtf *vf) void bnx2x_vf_enable_access(struct bnx2x *bp, u8 abs_vfid) { + u16 abs_fid; + + abs_fid = FW_VF_HANDLE(abs_vfid); + /* set the VF-PF association in the FW */ - storm_memset_vf_to_pf(bp, FW_VF_HANDLE(abs_vfid), BP_FUNC(bp)); - storm_memset_func_en(bp, FW_VF_HANDLE(abs_vfid), 1); + storm_memset_vf_to_pf(bp, abs_fid, BP_FUNC(bp)); + storm_memset_func_en(bp, abs_fid, 1); + + /* Invalidate fp_hsi version for vfs */ + if (bp->fw_cap & FW_CAP_INVALIDATE_VF_FP_HSI) + REG_WR8(bp, BAR_XSTRORM_INTMEM + + XSTORM_ETH_FUNCTION_INFO_FP_HSI_VALID_E2_OFFSET(abs_fid), 0); /* clear vf errors*/ bnx2x_vf_semi_clear_err(bp, abs_vfid);