From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shahed Shaikh Subject: [PATCH net-next 2/3] bnx2x: Ignore bandwidth attention in single function mode Date: Thu, 20 Sep 2018 11:22:51 -0700 Message-ID: <20180920182252.13457-3-shahed.shaikh@cavium.com> References: <20180920182252.13457-1-shahed.shaikh@cavium.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , , Shahed Shaikh To: Return-path: Received: from mail-eopbgr730044.outbound.protection.outlook.com ([40.107.73.44]:16250 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726827AbeIUAIV (ORCPT ); Thu, 20 Sep 2018 20:08:21 -0400 In-Reply-To: <20180920182252.13457-1-shahed.shaikh@cavium.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Shahed Shaikh 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 --- 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 faf64ba..16f64c6 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -3536,6 +3536,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); -- 1.8.3.1