From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DE98C43215 for ; Tue, 19 Nov 2019 05:52:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E54E3214D9 for ; Tue, 19 Nov 2019 05:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574142760; bh=olP18mzLHEq5aeklcBEE1+hOx3ydda638HvyajAvQIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=avm1LUpEJdvdTa4IXja5BQLKTbyHSEwx75IVIz95pabsmy/bBAzTbMjK0Z39y1Lxh vhnpkxsFfoFLefKxPVeu01ex3AVlP7CjIBYgtEr923qzIykcL54JeCUI6QepnJtyY0 UKRsHaUXqKu33daorJpyDbRExYg+RCQj7gT0P1Ec= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731927AbfKSFwi (ORCPT ); Tue, 19 Nov 2019 00:52:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:50258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731596AbfKSFwa (ORCPT ); Tue, 19 Nov 2019 00:52:30 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8235621783; Tue, 19 Nov 2019 05:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574142750; bh=olP18mzLHEq5aeklcBEE1+hOx3ydda638HvyajAvQIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IJ9y+yEw8B0iQVJ+abhUwU9kuTytHprlXgRj2Ga+KK9T24UjbOUXCETs/7EF4eJOT hEODsEP44n5M2NWhZW1wAiIOcMHb70aLtPbgn01tI3o14K0G7U8f99B+pgdwmLd1WB ZjXLYblG1cMz45vHTzw6CrryTb9Qa7xLmMVK5wLU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shahed Shaikh , Ariel Elior , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 170/239] bnx2x: Ignore bandwidth attention in single function mode Date: Tue, 19 Nov 2019 06:19:30 +0100 Message-Id: <20191119051333.925320107@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051255.850204959@linuxfoundation.org> References: <20191119051255.850204959@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shahed Shaikh [ Upstream commit 75a110a1783ef8324ffd763b24f4ac268253cbca ] This is a workaround for FW bug - MFW generates bandwidth attention in single function mode, which is only expected to be generated in multi function mode. This undesired attention in SF mode results in incorrect HW configuration and resulting into Tx timeout. Signed-off-by: Shahed Shaikh Signed-off-by: Ariel Elior Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 8f0c9f6de893d..dbe8feec456c2 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -3540,6 +3540,16 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp) */ static void bnx2x_config_mf_bw(struct bnx2x *bp) { + /* Workaround for MFW bug. + * MFW is not supposed to generate BW attention in + * single function mode. + */ + if (!IS_MF(bp)) { + DP(BNX2X_MSG_MCP, + "Ignoring MF BW config in single function mode\n"); + return; + } + if (bp->link_vars.link_up) { bnx2x_cmng_fns_init(bp, true, CMNG_FNS_MINMAX); bnx2x_link_sync_notify(bp); -- 2.20.1