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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 7F671C17440 for ; Sun, 10 Nov 2019 03:04:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 486AD208C3 for ; Sun, 10 Nov 2019 03:04:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573355053; bh=olP18mzLHEq5aeklcBEE1+hOx3ydda638HvyajAvQIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=AirCNF5c2GZsQpMgh6XLg531/YGAvlRcFIbbS1DB3R8pNGPy1seT18vDAR5CXATin HpLVV6MP+Hh2NnXpiZo3F4hdET1ShCy3hUhC9PCx/wkNGtaOxuXxW+L8qnsO+ld2dp Ba8/fc26rTDIGf8ztOg0R/oMvasJP6kPh/7JoWbA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729222AbfKJCq7 (ORCPT ); Sat, 9 Nov 2019 21:46:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:51706 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729205AbfKJCq6 (ORCPT ); Sat, 9 Nov 2019 21:46:58 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E821D2184C; Sun, 10 Nov 2019 02:46:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573354017; bh=olP18mzLHEq5aeklcBEE1+hOx3ydda638HvyajAvQIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bD1FU/xKyvS0qxqmWs40p6NX4foElJX1e+PkytFqnnULPWm3lbGni+3l1yvALFOud FOyS/WDWL3JJf1Vub3JyWQOaOeelqAekhqiF60y+/6Z5lmIG6e1B7zlheq9hlbywq6 gAG0N4NnTRotBvERXUhWd1b1ItFJma+kp8OO30JY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Shahed Shaikh , Ariel Elior , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 041/109] bnx2x: Ignore bandwidth attention in single function mode Date: Sat, 9 Nov 2019 21:44:33 -0500 Message-Id: <20191110024541.31567-41-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191110024541.31567-1-sashal@kernel.org> References: <20191110024541.31567-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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