From patchwork Wed Jun 30 22:22:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12352859 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 573FCC11F66 for ; Wed, 30 Jun 2021 22:22:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D94A6147E for ; Wed, 30 Jun 2021 22:22:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233302AbhF3WZK (ORCPT ); Wed, 30 Jun 2021 18:25:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:56224 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232459AbhF3WZG (ORCPT ); Wed, 30 Jun 2021 18:25:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1BB2561421; Wed, 30 Jun 2021 22:22:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625091757; bh=su7ua1fCTQ4Y+MxlJkwBXz1YcZptO1fJSDGHqWT11/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H2H9bgwd9W7HkBeyyyL/nfdWqXydpE08/JloSOMz7HjB3JvC3y+RrvdVCW73RrrAG UzlLNfU3MEncfcMuCcgTqxvSrorH0PlxH+0taYrq+mddq9+OLxUWhy1te+9VkjH/TO KHQQojx8k4MCblh0m0XRdoSAZ3culoSh1c9/oqNQzDFra/awnk3UFvGJbwfVs9R/fR skAfVz6OJj7vuQAORhqFgbbcxOAwi9ferPI3ZUBbnDWTeTID7qtTDFCAJBdE2uv/RV dO0d7B/K9Doy+teyr83NDacBqALbkde2TZPeGjT/C4nU2RvTAoo+sDsgT1oTSfGHFh LuH+WW9hWrHXQ== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot Cc: "David S . Miller" , Jakub Kicinski , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH net v2 1/6] net: dsa: mv88e6xxx: enable .port_set_policy() on Topaz Date: Thu, 1 Jul 2021 00:22:26 +0200 Message-Id: <20210630222231.2297-2-kabel@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630222231.2297-1-kabel@kernel.org> References: <20210630222231.2297-1-kabel@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Commit f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy") introduced .port_set_policy() method with implementation for several models, but forgot to add Topaz, which can use the 6352 implementation. Use the 6352 implementation of .port_set_policy() on Topaz. Signed-off-by: Marek Behún Fixes: f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy") Reviewed-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 961fa6b75cad..6bcee3e012d4 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3583,6 +3583,7 @@ static const struct mv88e6xxx_ops mv88e6141_ops = { .port_set_speed_duplex = mv88e6341_port_set_speed_duplex, .port_max_speed_mode = mv88e6341_port_max_speed_mode, .port_tag_remap = mv88e6095_port_tag_remap, + .port_set_policy = mv88e6352_port_set_policy, .port_set_frame_mode = mv88e6351_port_set_frame_mode, .port_set_ucast_flood = mv88e6352_port_set_ucast_flood, .port_set_mcast_flood = mv88e6352_port_set_mcast_flood, @@ -4383,6 +4384,7 @@ static const struct mv88e6xxx_ops mv88e6341_ops = { .port_set_speed_duplex = mv88e6341_port_set_speed_duplex, .port_max_speed_mode = mv88e6341_port_max_speed_mode, .port_tag_remap = mv88e6095_port_tag_remap, + .port_set_policy = mv88e6352_port_set_policy, .port_set_frame_mode = mv88e6351_port_set_frame_mode, .port_set_ucast_flood = mv88e6352_port_set_ucast_flood, .port_set_mcast_flood = mv88e6352_port_set_mcast_flood, From patchwork Wed Jun 30 22:22:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12352861 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFD79C11F68 for ; Wed, 30 Jun 2021 22:22:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4CA76148E for ; Wed, 30 Jun 2021 22:22:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233296AbhF3WZM (ORCPT ); Wed, 30 Jun 2021 18:25:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:56256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233072AbhF3WZI (ORCPT ); Wed, 30 Jun 2021 18:25:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9E3AC61483; Wed, 30 Jun 2021 22:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625091758; bh=Z+JCu0fUXWKTI7U3U6rKP9sMCqqxbMA05WT0fqnTkwY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BXGPRNFmOD1sarpJtrr2N7/1JPnde7O/FjCH48+3raev908VBbJgvcWPhWZAUCaXx W4SFH03T8MZnAv+nKgm5ZFfi77vksmUQNo7WNCubhA8bd6faCG5QiNHvTBOrilCPMq fKFDg33IwXn6WkewJu8iPGU4bhxl+9nVil1VyfkGZ8R4ntojxHVzWcXyh0mPETEkt6 ZTjjVcxG/JUNs03c8hbzwCfvgfEwpAas+N4MiotaJu8FTZKJXm9xoZR37r/Tc3sOsc 0PkdpV17iuSQhUCMR1eH1n7p6jJJ2I1lrdgXy85fxCwnsiKpcG2kr0tpG4YwfIMPC3 NDwCdUICA1MLA== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot Cc: "David S . Miller" , Jakub Kicinski , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH net v2 2/6] net: dsa: mv88e6xxx: use correct .stats_set_histogram() on Topaz Date: Thu, 1 Jul 2021 00:22:27 +0200 Message-Id: <20210630222231.2297-3-kabel@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630222231.2297-1-kabel@kernel.org> References: <20210630222231.2297-1-kabel@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Commit 40cff8fca9e3 ("net: dsa: mv88e6xxx: Fix stats histogram mode") introduced wrong .stats_set_histogram() method for Topaz family. The Peridot method should be used instead. Signed-off-by: Marek Behún Fixes: 40cff8fca9e3 ("net: dsa: mv88e6xxx: Fix stats histogram mode") Reviewed-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 6bcee3e012d4..b125d3227dbd 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3597,7 +3597,7 @@ static const struct mv88e6xxx_ops mv88e6141_ops = { .port_set_cmode = mv88e6341_port_set_cmode, .port_setup_message_port = mv88e6xxx_setup_message_port, .stats_snapshot = mv88e6390_g1_stats_snapshot, - .stats_set_histogram = mv88e6095_g1_stats_set_histogram, + .stats_set_histogram = mv88e6390_g1_stats_set_histogram, .stats_get_sset_count = mv88e6320_stats_get_sset_count, .stats_get_strings = mv88e6320_stats_get_strings, .stats_get_stats = mv88e6390_stats_get_stats, @@ -4398,7 +4398,7 @@ static const struct mv88e6xxx_ops mv88e6341_ops = { .port_set_cmode = mv88e6341_port_set_cmode, .port_setup_message_port = mv88e6xxx_setup_message_port, .stats_snapshot = mv88e6390_g1_stats_snapshot, - .stats_set_histogram = mv88e6095_g1_stats_set_histogram, + .stats_set_histogram = mv88e6390_g1_stats_set_histogram, .stats_get_sset_count = mv88e6320_stats_get_sset_count, .stats_get_strings = mv88e6320_stats_get_strings, .stats_get_stats = mv88e6390_stats_get_stats, From patchwork Wed Jun 30 22:22:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12352865 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0359CC11F68 for ; Wed, 30 Jun 2021 22:22:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D9D3661481 for ; Wed, 30 Jun 2021 22:22:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233354AbhF3WZO (ORCPT ); Wed, 30 Jun 2021 18:25:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:56274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233212AbhF3WZJ (ORCPT ); Wed, 30 Jun 2021 18:25:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2CF6261490; Wed, 30 Jun 2021 22:22:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625091760; bh=J0Ds62XsBNHYwds2+oM1nKWi5HyxozVAlqI9TYplaug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q8c4/J8hW+hgqPIm0eYWEb1Rqa/x3KzC0OxzCtn/w9Gqk5NkYP3DMcDfzIgmXdgcK FN9dCRDagBdrsLbd2H4HWwkwgCxjDxQxsjUUklUzEE1M40aKE6B4anoIvmZaj+zpkh vLqCvLqKfnYnskarlBV4oKut2vMiG+hzzN99SXbfeCBr1fe7i18Q+mP+aclmCd0gBR 2mn7lSxOXqYuYOIc3NKG/KqNoXaEWaFPNaUnY6a3db+95tgB0UyVNoLHslOpXPjbmi P7FFcy7Wk2P32h/AXGtpPBGubddbogHPNtuwMAEQdETw6Z6hd3j80S4FG4s3ZWlZKg bO3Y+8xNAOKRw== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot Cc: "David S . Miller" , Jakub Kicinski , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH net v2 3/6] net: dsa: mv88e6xxx: enable .rmu_disable() on Topaz Date: Thu, 1 Jul 2021 00:22:28 +0200 Message-Id: <20210630222231.2297-4-kabel@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630222231.2297-1-kabel@kernel.org> References: <20210630222231.2297-1-kabel@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Commit 9e5baf9b36367 ("net: dsa: mv88e6xxx: add RMU disable op") introduced .rmu_disable() method with implementation for several models, but forgot to add Topaz, which can use the Peridot implementation. Use the Peridot implementation of .rmu_disable() on Topaz. Signed-off-by: Marek Behún Fixes: 9e5baf9b36367 ("net: dsa: mv88e6xxx: add RMU disable op") Reviewed-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index b125d3227dbd..d4b05c10e5f2 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3607,6 +3607,7 @@ static const struct mv88e6xxx_ops mv88e6141_ops = { .mgmt_rsvd2cpu = mv88e6390_g1_mgmt_rsvd2cpu, .pot_clear = mv88e6xxx_g2_pot_clear, .reset = mv88e6352_g1_reset, + .rmu_disable = mv88e6390_g1_rmu_disable, .vtu_getnext = mv88e6352_g1_vtu_getnext, .vtu_loadpurge = mv88e6352_g1_vtu_loadpurge, .serdes_power = mv88e6390_serdes_power, @@ -4408,6 +4409,7 @@ static const struct mv88e6xxx_ops mv88e6341_ops = { .mgmt_rsvd2cpu = mv88e6390_g1_mgmt_rsvd2cpu, .pot_clear = mv88e6xxx_g2_pot_clear, .reset = mv88e6352_g1_reset, + .rmu_disable = mv88e6390_g1_rmu_disable, .vtu_getnext = mv88e6352_g1_vtu_getnext, .vtu_loadpurge = mv88e6352_g1_vtu_loadpurge, .serdes_power = mv88e6390_serdes_power, From patchwork Wed Jun 30 22:22:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12352863 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BF00C11F69 for ; Wed, 30 Jun 2021 22:22:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 117546147D for ; Wed, 30 Jun 2021 22:22:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233509AbhF3WZP (ORCPT ); Wed, 30 Jun 2021 18:25:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:56294 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233131AbhF3WZL (ORCPT ); Wed, 30 Jun 2021 18:25:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AFF8661476; Wed, 30 Jun 2021 22:22:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625091761; bh=shjbxzD13k4eSgUBRrDrOkxybGaiYTT/RZAYeK1hRCg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GazN6VDy8A0uOXihZoI+5etmFpIWzpb+F9iBYoN+f/3UzYy/bvAPQJa6aOggZAwfD uou3BHHbs9G2/rqkXg1QOphhFiIUIJDtYbP8TimNNzKip82e/cAKKzuaaFGIu2bRGt w9Qlr8v6Q15iOMlhhrFfMwW6D6wdMtGC5BYsCBa5+48t2jm/B6RwpKDk6d5TFj+r/P V0Bmyo6+uO86Rp6KZPX03Zfa6ZJnsNvRGvMRaygIh0s6dzdrkqVJrDm2brv97QYn33 bRMn1nBmWC+m7ZPTx0okLyn1gS4ZHvQYV9M005RPvhCPDubOU/9yyWedLqFQ6NEQCg D0leHhzRxxDYQ== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot Cc: "David S . Miller" , Jakub Kicinski , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH net v2 4/6] net: dsa: mv88e6xxx: enable devlink ATU hash param for Topaz Date: Thu, 1 Jul 2021 00:22:29 +0200 Message-Id: <20210630222231.2297-5-kabel@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630222231.2297-1-kabel@kernel.org> References: <20210630222231.2297-1-kabel@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Commit 23e8b470c7788 ("net: dsa: mv88e6xxx: Add devlink param for ATU hash algorithm.") introduced ATU hash algorithm access via devlink, but did not enable it for Topaz. Enable this feature also for Topaz. Signed-off-by: Marek Behún Fixes: 23e8b470c7788 ("net: dsa: mv88e6xxx: Add devlink param for ATU hash algorithm.") Reviewed-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index d4b05c10e5f2..354ff0b84b7f 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3608,6 +3608,8 @@ static const struct mv88e6xxx_ops mv88e6141_ops = { .pot_clear = mv88e6xxx_g2_pot_clear, .reset = mv88e6352_g1_reset, .rmu_disable = mv88e6390_g1_rmu_disable, + .atu_get_hash = mv88e6165_g1_atu_get_hash, + .atu_set_hash = mv88e6165_g1_atu_set_hash, .vtu_getnext = mv88e6352_g1_vtu_getnext, .vtu_loadpurge = mv88e6352_g1_vtu_loadpurge, .serdes_power = mv88e6390_serdes_power, @@ -4410,6 +4412,8 @@ static const struct mv88e6xxx_ops mv88e6341_ops = { .pot_clear = mv88e6xxx_g2_pot_clear, .reset = mv88e6352_g1_reset, .rmu_disable = mv88e6390_g1_rmu_disable, + .atu_get_hash = mv88e6165_g1_atu_get_hash, + .atu_set_hash = mv88e6165_g1_atu_set_hash, .vtu_getnext = mv88e6352_g1_vtu_getnext, .vtu_loadpurge = mv88e6352_g1_vtu_loadpurge, .serdes_power = mv88e6390_serdes_power, From patchwork Wed Jun 30 22:22:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12352867 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B9F4C11F6A for ; Wed, 30 Jun 2021 22:22:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 54D7E61421 for ; Wed, 30 Jun 2021 22:22:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233617AbhF3WZQ (ORCPT ); Wed, 30 Jun 2021 18:25:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:56320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233319AbhF3WZM (ORCPT ); Wed, 30 Jun 2021 18:25:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3DF0761481; Wed, 30 Jun 2021 22:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625091763; bh=VNWyHmHcvuy9BYdiqzVGydYJsl4K81FfONVD5J7Hm6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mefuGcKVsWy55kPAPxxgMQEWX7SsCaN3ulo4HyQK9yyA4ZMCUP4x8zPgVccyMJgYS mX2NcQE3NEtvaCUSofE2H4QvWyjKzSQDMsybmbYhwdx+QkhilckreUk5mGme98pkH0 6Uc3HtfHHtycNcjReChFqmRmUNvYWC5+vxm7IY59fN/juGtaOWkwitEV0+HA/kIBhK HMY1LHvD22dKcVox+wMv0eSUsigZcvmYZcX7aMPMAfQ9MFuX/bE2wi98RAEtXQYeVQ FI/JQT8Sh6t52kf8haOK/0pdVglE/bJA7vmPqdj5EGlQztxprCFBXk4FDFnaTml2EY zGvwFA7puT7wQ== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot Cc: "David S . Miller" , Jakub Kicinski , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH net v2 5/6] net: dsa: mv88e6xxx: enable SerDes RX stats for Topaz Date: Thu, 1 Jul 2021 00:22:30 +0200 Message-Id: <20210630222231.2297-6-kabel@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630222231.2297-1-kabel@kernel.org> References: <20210630222231.2297-1-kabel@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Commit 0df952873636a ("mv88e6xxx: Add serdes Rx statistics") added support for RX statistics on SerDes ports for Peridot. This same implementation is also valid for Topaz, but was not enabled at the time. We need to use the generic .serdes_get_lane() method instead of the Peridot specific one in the stats methods so that on Topaz the proper one is used. Signed-off-by: Marek Behún Fixes: 0df952873636a ("mv88e6xxx: Add serdes Rx statistics") --- drivers/net/dsa/mv88e6xxx/chip.c | 6 ++++++ drivers/net/dsa/mv88e6xxx/serdes.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 354ff0b84b7f..1e95a0facbd4 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3623,6 +3623,9 @@ static const struct mv88e6xxx_ops mv88e6141_ops = { .serdes_irq_enable = mv88e6390_serdes_irq_enable, .serdes_irq_status = mv88e6390_serdes_irq_status, .gpio_ops = &mv88e6352_gpio_ops, + .serdes_get_sset_count = mv88e6390_serdes_get_sset_count, + .serdes_get_strings = mv88e6390_serdes_get_strings, + .serdes_get_stats = mv88e6390_serdes_get_stats, .phylink_validate = mv88e6341_phylink_validate, }; @@ -4429,6 +4432,9 @@ static const struct mv88e6xxx_ops mv88e6341_ops = { .gpio_ops = &mv88e6352_gpio_ops, .avb_ops = &mv88e6390_avb_ops, .ptp_ops = &mv88e6352_ptp_ops, + .serdes_get_sset_count = mv88e6390_serdes_get_sset_count, + .serdes_get_strings = mv88e6390_serdes_get_strings, + .serdes_get_stats = mv88e6390_serdes_get_stats, .phylink_validate = mv88e6341_phylink_validate, }; diff --git a/drivers/net/dsa/mv88e6xxx/serdes.c b/drivers/net/dsa/mv88e6xxx/serdes.c index e4fbef81bc52..b1d46dd8eaab 100644 --- a/drivers/net/dsa/mv88e6xxx/serdes.c +++ b/drivers/net/dsa/mv88e6xxx/serdes.c @@ -722,7 +722,7 @@ static struct mv88e6390_serdes_hw_stat mv88e6390_serdes_hw_stats[] = { int mv88e6390_serdes_get_sset_count(struct mv88e6xxx_chip *chip, int port) { - if (mv88e6390_serdes_get_lane(chip, port) < 0) + if (mv88e6xxx_serdes_get_lane(chip, port) < 0) return 0; return ARRAY_SIZE(mv88e6390_serdes_hw_stats); @@ -734,7 +734,7 @@ int mv88e6390_serdes_get_strings(struct mv88e6xxx_chip *chip, struct mv88e6390_serdes_hw_stat *stat; int i; - if (mv88e6390_serdes_get_lane(chip, port) < 0) + if (mv88e6xxx_serdes_get_lane(chip, port) < 0) return 0; for (i = 0; i < ARRAY_SIZE(mv88e6390_serdes_hw_stats); i++) { @@ -770,7 +770,7 @@ int mv88e6390_serdes_get_stats(struct mv88e6xxx_chip *chip, int port, int lane; int i; - lane = mv88e6390_serdes_get_lane(chip, port); + lane = mv88e6xxx_serdes_get_lane(chip, port); if (lane < 0) return 0; From patchwork Wed Jun 30 22:22:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12352869 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31446C11F66 for ; Wed, 30 Jun 2021 22:22:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1AD9761477 for ; Wed, 30 Jun 2021 22:22:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233929AbhF3WZR (ORCPT ); Wed, 30 Jun 2021 18:25:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:56352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233336AbhF3WZO (ORCPT ); Wed, 30 Jun 2021 18:25:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C00446147E; Wed, 30 Jun 2021 22:22:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625091764; bh=4uWCrW7McsS6Rg1FgUC+m+llNKgmulxnudse+VqZFd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lKPl4KrU7uA1GDJIZkVOadMybqLWVoxnVKjC6HPT/Q2nMPQZmbSy2Yo3DydbP00MV ydmUIIWq+WW7EVBfvYQHEUCPcU33bt/TUxjZujzMJULrke/xTEbLpu+Dy1b4dzAYPT 08dYBwygAmoLnZZLojRq9u/OBve/h2A/EOs7A/MkY5tWMChQDPhDhfM6hLCp6tMu0V up3TQsjw+HcOkXDLKqbLFbShx3ytvG+oBc5zxVbRoVqFMSiXTp/ehZ4SRjyPDfjmMc 5adBJSxyFgcI9zP0WDKmu+P2F7GGezssR5oyZpwYoIcTcTWiL6scHdSuaDihD1DdDv w1wzfLMYAy+og== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: netdev@vger.kernel.org, Andrew Lunn , Vivien Didelot Cc: "David S . Miller" , Jakub Kicinski , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH net v2 6/6] net: dsa: mv88e6xxx: enable SerDes PCS register dump via ethtool -d on Topaz Date: Thu, 1 Jul 2021 00:22:31 +0200 Message-Id: <20210630222231.2297-7-kabel@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630222231.2297-1-kabel@kernel.org> References: <20210630222231.2297-1-kabel@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Commit bf3504cea7d7e ("net: dsa: mv88e6xxx: Add 6390 family PCS registers to ethtool -d") added support for dumping SerDes PCS registers via ethtool -d for Peridot. The same implementation is also valid for Topaz, but was not enabled at the time. Signed-off-by: Marek Behún Fixes: bf3504cea7d7e ("net: dsa: mv88e6xxx: Add 6390 family PCS registers to ethtool -d") Reviewed-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 1e95a0facbd4..beb41572d04e 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3626,6 +3626,8 @@ static const struct mv88e6xxx_ops mv88e6141_ops = { .serdes_get_sset_count = mv88e6390_serdes_get_sset_count, .serdes_get_strings = mv88e6390_serdes_get_strings, .serdes_get_stats = mv88e6390_serdes_get_stats, + .serdes_get_regs_len = mv88e6390_serdes_get_regs_len, + .serdes_get_regs = mv88e6390_serdes_get_regs, .phylink_validate = mv88e6341_phylink_validate, }; @@ -4435,6 +4437,8 @@ static const struct mv88e6xxx_ops mv88e6341_ops = { .serdes_get_sset_count = mv88e6390_serdes_get_sset_count, .serdes_get_strings = mv88e6390_serdes_get_strings, .serdes_get_stats = mv88e6390_serdes_get_stats, + .serdes_get_regs_len = mv88e6390_serdes_get_regs_len, + .serdes_get_regs = mv88e6390_serdes_get_regs, .phylink_validate = mv88e6341_phylink_validate, };