Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4631337pxj; Wed, 12 May 2021 09:37:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSAoL6JAvl9o1Q0rHvS5O7l2K/r2SkriEbRtkiVensSdCRy7Ul43Xp74X4VPe7tXZoEvkw X-Received: by 2002:a17:906:3bc6:: with SMTP id v6mr39312385ejf.165.1620837479609; Wed, 12 May 2021 09:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620837479; cv=none; d=google.com; s=arc-20160816; b=KJEIIy0U69HtAs/cRJ2Vk8tZ91TKtwpZGr0XvScifbWkbGXjPvDhDFFyzdnIP3EF7Q RKloM93dO0HzFehDMxhiilJChsSl+2+f/DGUTlmJJyunEwPX2ZOLbkr83qgcF66dMZw9 dP8wckcirnQUjMEi9rUQ0cLZNW/K4KRCfTYuHItB/18IQ6F102T02vOaNrDtgc6kRzhp 4weyIwYk1oKz2vI+g+xTeNaddAW/p890SyKRtmVA7GvEN72moBcFQBv+23ufjfql3KcS QA7Gn5sqtHG9xG6FF18MsDIUH1x6B1q5Sk+in1pC0uQPLX76OqjODra8G03iS8GNOUUG M1/Q== 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=035jKdx9PVcfXPzcb9HgbIM/qPP/3dEb++/buEjX2mM=; b=yGAO2s/2Oz1vljVKcinWPC1loVio57K2/JjJdes6wRQSqYFDedF7Vw2ln2D0H2z9Lg W+zxSlTrTy015gZjvHu6Vu01oQp/GGwvX2k4NdsGTWVrmS8D8gUm4Wd90eQXcQUaCd/l hmVao2HvgDwWJDzyqEauMXQD9eg+npmHJ4ZwlJZxPUNS84T0pBxqMpY6nHhXjKsurM0J NdE7i6dsrzbuHqbW/i/kHpC4oWWT2W6yyouJqhqcDux+QOmmL0CKxjLnXxhBHvmzql4w 6oitfgjiCVCHkskHgym4RoOcTJJ5SNkcXsjJgpMtL2KDUpRll+oRVjIgUA3uavEYTROl y2tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Ie1J/802"; 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 bj22si415946ejb.53.2021.05.12.09.37.34; Wed, 12 May 2021 09:37:59 -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="Ie1J/802"; 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 S242827AbhELQfz (ORCPT + 99 others); Wed, 12 May 2021 12:35:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:42206 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235262AbhELPn2 (ORCPT ); Wed, 12 May 2021 11:43:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 525FD61C89; Wed, 12 May 2021 15:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832944; bh=nYdm/1Foq3zpi5pSmv6cBeYEM0UPepIDimfFb/6Wdd8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ie1J/802xWGo0eY7Bq30SIJSYaYoy+PgZzaaM1IBO7TDk+MehD4vSv+vXxE2S8eba JYA5qalUOOo1fIlJ4aXklATTcWgOdS71IBnA914oS299CnHhI/6zFLa+FoDDi2F5hk o3BvHk73LQuhdW/WdVr2PGsrOckrbRD5G71XPGn4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yinjun Zhang , Louis Peens , Simon Horman , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 479/530] nfp: devlink: initialize the devlink port attribute "lanes" Date: Wed, 12 May 2021 16:49:49 +0200 Message-Id: <20210512144835.499815048@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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: Yinjun Zhang [ Upstream commit 90b669d65d99a3ee6965275269967cdee4da106e ] The number of lanes of devlink port should be correctly initialized when registering the port, so that the input check when running "devlink port split count " can pass. Fixes: a21cf0a8330b ("devlink: Add a new devlink port lanes attribute and pass to netlink") Signed-off-by: Yinjun Zhang Signed-off-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c index 97d2b03208de..7a8187458724 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c @@ -364,6 +364,7 @@ int nfp_devlink_port_register(struct nfp_app *app, struct nfp_port *port) attrs.split = eth_port.is_split; attrs.splittable = !attrs.split; + attrs.lanes = eth_port.port_lanes; attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL; attrs.phys.port_number = eth_port.label_port; attrs.phys.split_subport_number = eth_port.label_subport; -- 2.30.2