Received: by 10.213.65.68 with SMTP id h4csp478305imn; Fri, 16 Mar 2018 09:00:01 -0700 (PDT) X-Google-Smtp-Source: AG47ELuDdnb3bx6EwuaRZtFeyGXT8hcb2mbZJzpE5ADP9NCZDLQIXlorl95ZrUTuYQiPfglEnt2j X-Received: by 2002:a17:902:6ac2:: with SMTP id i2-v6mr2634128plt.368.1521216001759; Fri, 16 Mar 2018 09:00:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216001; cv=none; d=google.com; s=arc-20160816; b=vNoI5aX+yzUGlPZavp5uqeyPPmYa4OnbibuebVzisoCS1BusWAP+JzJ/UtnA0rCJdI wNKhPQGorLUcrTAPelIte5yGxj13lDGopB8TrmIoHDNXDzKUs+v351YuBBwtWuPBmixN sO8B64RF7n6tDK6dNNL4a1s8DSsXGv0cW3yyfLSsQotg04TLOReAaKsXa/E7AkvzuBEd l16VE2772XaWLkYXwTI9t3eekbc3V4SNKkBRtnArz2R4K5LMe0SosYgUm7SJt4B2Q92l CpmfN07oK9C+XOBf5ukNR+8XPy5o9qosh48mwRdg0E3lAQSK5PxcO8+/KyaSQhqGKsvd lxFw== 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=5+hzjfk3OWPjvJANd4HPmv5XnY+WjrPxfspbsMQ3eSQ=; b=HMvUBK/bkaHNQnspyduBYTPObsQTI/h/eCNt4xYM05fAPHTe3R4uCi0HFYIO+eIf0j KxAeWgYEM1BGeQJKXLziS97CpcrDzUJ0Ec6yvYUzLQukDCkWSar/i20vUpU3hRK0u8+V hgKiC4X8Y5eKtq4+XkFyQg7rRZ1O9zDwFAakxt8KSCUyqDLGwPvolkmBKaxk0c3MO9qH Cr302AV7MjlCSSAZEsHoCMJPSkzTSMBbdwJ2TK9n6vROE5faMOW5tYw6wBw5iIGJ2huR hgjDmGGM9OouDp0dDS3j6M7VaZ9DElp0dROnvX0PMzKopf/4LFfCzDek7LSejbKXJiUc x+aA== 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 v15si5208982pgt.635.2018.03.16.08.59.47; Fri, 16 Mar 2018 09:00:01 -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 S965305AbeCPPnl (ORCPT + 99 others); Fri, 16 Mar 2018 11:43:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45610 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965287AbeCPPnh (ORCPT ); Fri, 16 Mar 2018 11:43:37 -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 7EF0A360; Fri, 16 Mar 2018 15:43:36 +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.15 098/128] bnxt_en: Dont print "Link speed -1 no longer supported" messages. Date: Fri, 16 Mar 2018 16:23:59 +0100 Message-Id: <20180316152341.435859136@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152336.199007505@linuxfoundation.org> References: <20180316152336.199007505@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.15-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 @@ -1706,12 +1706,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 */