Received: by 10.213.65.68 with SMTP id h4csp14746imn; Mon, 19 Mar 2018 17:57:28 -0700 (PDT) X-Google-Smtp-Source: AG47ELumt5J7dTZLR+7wW3idTCOdVErnpJFxXPLjJBAIIVxUoK6rKjCp0bCsHsm4LvWMbEIER5Te X-Received: by 10.99.96.19 with SMTP id u19mr10308524pgb.261.1521507448208; Mon, 19 Mar 2018 17:57:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521507448; cv=none; d=google.com; s=arc-20160816; b=inF9CcaUrsXRvWXaeaHgwdi5WXmcOW1tVY5KtrMUF7R4+hnfLTlgxt3NrubcCY5Woe r1wdBh4bHQzpRGdcjru5G7luBYfzgDEStNbyn2g0quKasl/RSyxbnIpyotf/3YZomQe+ RKvjgZqELL3VUItBLl15uKJom5s8D0l2RdlB3x9ndFPolY3LtfqLVb3351Wd8dQeT0eB om43xJD7WqZ34+87nh+YfIufEBxOSOCWa5cFycyh5hKJbGSvsfyNtLE+Jzb0VmDJGUsW /+BbsmJOhzFFGkZGpGXfXSe+jy8B3BI3wkakGioTZxvNP4XLFIgB7zWzMCK2w9Wyg8hS NRRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=w2+jqMp/n6p512Fi83UoEtDWjmz/g8vD/I98nUUoIew=; b=N+GWeHaNNFSuobizvUDt6xKQkd0Mdt5UUg+bNq0qsnZVows5iPdDKXVuhGxl+dHTnM Gun/0w8fMNTUMvBKLIM2gpfmk68/PocbePW745kFN9dEsGW6xsWct5lIgsHTv76nFLDi kO6pNPRXPaPNcqjRG5o9nMwUbNhqVwdUng8EPEybNOPFQpyUDg6OCbGwC/ifqfx7YjdI 0vCw1h9EzL6jiF/dHp4cdMZ7JtUaeDwrh5gV8LVzCRuytm44YScO14rKZW9E/cV3gh6x y08T2oXpp6lHaIWqTa0GPooagcAmfKoFZAiP6Bm3wXlKnqG1xv0iCU19dfYxapKkhdxs dVJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v2-v6si435768plp.113.2018.03.19.17.57.14; Mon, 19 Mar 2018 17:57:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969917AbeCSS0m (ORCPT + 99 others); Mon, 19 Mar 2018 14:26:42 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50830 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031645AbeCSS0d (ORCPT ); Mon, 19 Mar 2018 14:26:33 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 79B11115E; Mon, 19 Mar 2018 18:26:32 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Bogendoerfer , Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 193/241] bnxt_en: Dont print "Link speed -1 no longer supported" messages. Date: Mon, 19 Mar 2018 19:07:38 +0100 Message-Id: <20180319180759.134408058@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Chan [ Upstream commit a8168b6cee6e9334dfebb4b9108e8d73794f6088 ] On some dual port NICs, the 2 ports have to be configured with compatible link speeds. Under some conditions, a port's configured speed may no longer be supported. The firmware will send a message to the driver when this happens. Improve this logic that prints out the warning by only printing it if we can determine the link speed that is no longer supported. If the speed is unknown or it is in autoneg mode, skip the warning message. Reported-by: Thomas Bogendoerfer Signed-off-by: Michael Chan Tested-by: Thomas Bogendoerfer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -1498,12 +1498,16 @@ static int bnxt_async_event_process(stru if (BNXT_VF(bp)) goto async_event_process_exit; - if (data1 & 0x20000) { + + /* print unsupported speed warning in forced speed mode only */ + if (!(link_info->autoneg & BNXT_AUTONEG_SPEED) && + (data1 & 0x20000)) { u16 fw_speed = link_info->force_link_speed; u32 speed = bnxt_fw_to_ethtool_speed(fw_speed); - netdev_warn(bp->dev, "Link speed %d no longer supported\n", - speed); + if (speed != SPEED_UNKNOWN) + netdev_warn(bp->dev, "Link speed %d no longer supported\n", + speed); } set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event); /* fall thru */