From patchwork Tue Jan 25 18:54:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Chopra X-Patchwork-Id: 536767 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 5F262C433F5 for ; Tue, 25 Jan 2022 18:55:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233701AbiAYSzR (ORCPT ); Tue, 25 Jan 2022 13:55:17 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:19536 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233755AbiAYSzQ (ORCPT ); Tue, 25 Jan 2022 13:55:16 -0500 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20PAe15k008698; Tue, 25 Jan 2022 10:55:13 -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=YQsDqNXcTcZEF4i9BUO4Q4AGEJDYQFCke41AokduE0qowSl8E/VWowP1jdERnaM282c/ 4A9pNTFS6XF2uHoMrUfC3H7OcwlqM2Oa2YpwM/uwVzqMFa/JMYhH0+o6XHx286FXyIZx nTi5X3WELP6PbzUAU850YYWP+V7h0yjnz26XBPunP+wAEiijJlLI5MVSc4/f2QKXBHd9 9MtsWHThj1pJLVIkfW4jM9ad3HklVDI++5a8Z8Ll2MBEDxMh1HRyZsV8eRrtf/TjKva0 feefBbYfmGkQO2Mbut8Gv0JpraADhwzhTuwbTi5KwnK+cI+KgzRzjLfwUkV99uK1q1TA Sg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3dt8muk3t0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 25 Jan 2022 10:55:13 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 25 Jan 2022 10:55:11 -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:55:11 -0800 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 7FAB85E6867; Tue, 25 Jan 2022 10:55:11 -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 20PIt2pM026427; Tue, 25 Jan 2022 10:55:02 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 20PIsq4t026426; Tue, 25 Jan 2022 10:54:52 -0800 From: Manish Chopra To: CC: , , Subject: [PATCH stable 5.10 2/2] bnx2x: Invalidate fastpath HSI version for VFs Date: Tue, 25 Jan 2022 10:54:33 -0800 Message-ID: <20220125185433.26378-2-manishc@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20220125185433.26378-1-manishc@marvell.com> References: <20220125185433.26378-1-manishc@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: -lNpNqf_5M1MpDUxmkgNvRvAeE6_zqiI X-Proofpoint-GUID: -lNpNqf_5M1MpDUxmkgNvRvAeE6_zqiI 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);