Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3515323pxf; Mon, 15 Mar 2021 11:15:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6iSA+dG1VuGg5MDiJAnzzCl2V7pMzXRJO9jntrN77uOeGCl+sDxdJwXUe4U8ef4VumaFr X-Received: by 2002:a05:6402:270c:: with SMTP id y12mr6816404edd.284.1615832112176; Mon, 15 Mar 2021 11:15:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832112; cv=none; d=google.com; s=arc-20160816; b=DTBRhlRIa6CGOkMUNI6CP3/V+FvNILrHEZAvTYhlg+HU3YsGxHpKpX+6sbSv71qdjp 6Vztuipe9JLGQvS1uewd3b0hjyzSdOyJIoUm4Xxl4SN4niNnQd4Gg3ren2x300GU7K/m zWvmiQmNX2d5KwszC44NbXlgXcDjsg5jsXB4+IHnxJfT8FqR4GJaDc37rsxtniMU4Jcl L1D6kt2JWaXTzhvNLEWlMW2fQak6y9RgrdrQaN5Grt8foWa6+8kAHBGE86mdaKIoim39 oeFQDLh9WfLcRYdgsafkhHSsW+eO2DcsAWLDg2qM9B353zRFD18CGGPK7okzRykDRv0r zVIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EaYTUqnjLI19opT3CTBscVMxUs+WYdS1tcnikQ1uYc0=; b=FR910+zQhk6VH6D+DJErmexLa2B/f52eZOgiUcHm1Z4jaOXqt+/5TLgOaHjeCdgBjG 6SGUBi5+is2K2WSoJkN1NSMgiMVVK/ovPQ644O8JzgmprKIKztHJO3DQZqFSE8OSS81j HWygeujsEHns90QAufHrEipGy/dra2Lik7fUQ4RbAB6tLbw9fM/yIhVB9e7lkguo4dWb wN7OYLTqvScgrTkBOOoNSigqvFYXm3E8NQQ3pPHJwMJZlPsYk+BOkB2ROFgBgTW8gZUc aO7UTtzRHUkbBNBgqH+6+Nce6QOPdxumnYv/cxJCOA7kLEkA38/2DI7IXPA01mIJafPI NFEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Eg8flZUA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n28si2695765edc.564.2021.03.15.11.14.49; Mon, 15 Mar 2021 11:15:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Eg8flZUA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232369AbhCOONm (ORCPT + 99 others); Mon, 15 Mar 2021 10:13:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:34900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232562AbhCON7D (ORCPT ); Mon, 15 Mar 2021 09:59:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8436E64F5F; Mon, 15 Mar 2021 13:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816716; bh=ddOZxZgRGynkfvgnaUEUSf5yjvmyGJvc7TfwxF016hA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Eg8flZUAHT7o9AS3ysAmq3+4pzbv3MjZGFVEuxF4taQCKf4LzBSGrbvqeUSZkf9PU wiJ5nscreTJs+9TM4E2srXw48xBu5a5OQ5u+YZE05blyLIpBqcSDI5Qug9C9ucAYOc 6cAX/ilhydgKxoF4R1bQy/c6+A61WsKGM2X7oJ5M= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Danielle Ratson , Eddie Shklaer , Jiri Pirko , Ido Schimmel , Jakub Kicinski Subject: [PATCH 5.10 072/290] mlxsw: spectrum_ethtool: Add an external speed to PTYS register Date: Mon, 15 Mar 2021 14:52:45 +0100 Message-Id: <20210315135544.344794069@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Danielle Ratson commit ae9b24ddb69b4e31cda1b5e267a5a08a1db11717 upstream. Currently, only external bits are added to the PTYS register, whereas there is one external bit that is wrongly marked as internal, and so was recently removed from the register. Add that bit to the PTYS register again, as this bit is no longer internal. Its removal resulted in '100000baseLR4_ER4/Full' link mode no longer being supported, causing a regression on some setups. Fixes: 5bf01b571cf4 ("mlxsw: spectrum_ethtool: Remove internal speeds from PTYS register") Signed-off-by: Danielle Ratson Reported-by: Eddie Shklaer Tested-by: Eddie Shklaer Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c | 5 +++++ drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/mellanox/mlxsw/reg.h +++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h @@ -4208,6 +4208,7 @@ MLXSW_ITEM32(reg, ptys, ext_eth_proto_ca #define MLXSW_REG_PTYS_ETH_SPEED_100GBASE_CR4 BIT(20) #define MLXSW_REG_PTYS_ETH_SPEED_100GBASE_SR4 BIT(21) #define MLXSW_REG_PTYS_ETH_SPEED_100GBASE_KR4 BIT(22) +#define MLXSW_REG_PTYS_ETH_SPEED_100GBASE_LR4_ER4 BIT(23) #define MLXSW_REG_PTYS_ETH_SPEED_25GBASE_CR BIT(27) #define MLXSW_REG_PTYS_ETH_SPEED_25GBASE_KR BIT(28) #define MLXSW_REG_PTYS_ETH_SPEED_25GBASE_SR BIT(29) --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c @@ -1171,6 +1171,11 @@ static const struct mlxsw_sp1_port_link_ .mask_ethtool = ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT, .speed = SPEED_100000, }, + { + .mask = MLXSW_REG_PTYS_ETH_SPEED_100GBASE_LR4_ER4, + .mask_ethtool = ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT, + .speed = SPEED_100000, + }, }; #define MLXSW_SP1_PORT_LINK_MODE_LEN ARRAY_SIZE(mlxsw_sp1_port_link_mode) --- a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c +++ b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c @@ -612,7 +612,8 @@ static const struct mlxsw_sx_port_link_m { .mask = MLXSW_REG_PTYS_ETH_SPEED_100GBASE_CR4 | MLXSW_REG_PTYS_ETH_SPEED_100GBASE_SR4 | - MLXSW_REG_PTYS_ETH_SPEED_100GBASE_KR4, + MLXSW_REG_PTYS_ETH_SPEED_100GBASE_KR4 | + MLXSW_REG_PTYS_ETH_SPEED_100GBASE_LR4_ER4, .speed = 100000, }, };