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,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 DF898C432C0 for ; Fri, 22 Nov 2019 10:35:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD8F72071F for ; Fri, 22 Nov 2019 10:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574418912; bh=Cg+4qi4q+XTTYzZRmspi7f+I4Y5Jitg8gRm9nE/UjfY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Gt2Io5Uh8JTesHLet99+A2reykxQivaxXivhRDlbjBxfAiMbpUyCD2yPl6J3Lfi7k OVelkmx25iuPLRnShq0QovtfcOMs6h+fSErNh61Mn0lXlp6c2dmWJuMCtFYCTCU0iX glJfTh0bSCA/W60YlfIM/WGpPu3Lhx031ZGjen/o= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728213AbfKVKfL (ORCPT ); Fri, 22 Nov 2019 05:35:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:60938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728202AbfKVKfG (ORCPT ); Fri, 22 Nov 2019 05:35:06 -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 DB10B20715; Fri, 22 Nov 2019 10:35:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574418906; bh=Cg+4qi4q+XTTYzZRmspi7f+I4Y5Jitg8gRm9nE/UjfY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZG2UN2KgTVnUY7/Uuae/KFYieaItJJVRNeRIwc58Z1N4pcV6b6eRNt/oFUI1uliR4 hteyFb5EyhNS0muPxJexsFo+rbgCsF1werdKEBq3ylwGgeeH7rz7p/kbgE5jdXnFOk Eton6zjzXjyP4fvbkpe5H8V0iordOrgHirVmjpx4= 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.4 075/159] bnx2x: Ignore bandwidth attention in single function mode Date: Fri, 22 Nov 2019 11:27:46 +0100 Message-Id: <20191122100759.367500457@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100704.194776704@linuxfoundation.org> References: <20191122100704.194776704@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 d450d8b3708cd..82960603da332 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -3532,6 +3532,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