From patchwork Thu Sep 16 12:03:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 513510 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 E0D67C433F5 for ; Thu, 16 Sep 2021 12:04:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C09D860F21 for ; Thu, 16 Sep 2021 12:04:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238928AbhIPMFa (ORCPT ); Thu, 16 Sep 2021 08:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238813AbhIPMF3 (ORCPT ); Thu, 16 Sep 2021 08:05:29 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB402C061574 for ; Thu, 16 Sep 2021 05:04:08 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id m3so15727717lfu.2 for ; Thu, 16 Sep 2021 05:04:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H0bHfm2OHc/+R26LWx41QW/EjW8T978QdQn3bUA25nM=; b=CDPdy1jDmdSzJdQCO5FmKXuWbeM/VbdrSDcV1detcw+a0KqARZKtTem77oSY1w50Fu /LV/dyPcxCMa1K14jRhBwsrEuK6+7I8mJwe6SCRZ2d+jUJUQR3FYvPVUOme39boemzDo xP793KzxjyWChTI25QVzIvttSIdt3GaHIE08mTToqL5Swi4qreOBS4pg6Pb96CZzpWMq usUOSmdAFhDM+N61IQHxLmRwpj+2KYq1WshX+pzhsiwbT5+95+9L5D+q1W19QOySJ2rt jJLMNj72gsVwhRm/UhsA/9Ba/40nhX1ppOx1ObTAqE5ls0W6ML8/nz1WCgqTnpObswo7 lLsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H0bHfm2OHc/+R26LWx41QW/EjW8T978QdQn3bUA25nM=; b=HssCo8kEko9jcbypbRJZz0G9uWBrlRCI1D1PkmpFaluqbUnr/dWuzUjZ/pF0e8c6Ju llh3HH2lKaey92t4mIpP5sNaEaSIeLOUy33UPN/vA4Ku4bcS5j9H25SQQqi+1Ykl8m2D 7rvfv5iJhndgzKlYvqdVada57n1gE9D7sKUHdaOQLv0LzLH19QRDWcsHqmc0lrpcgWRM 2FMqbfHo4530L2blOh55U/Q0tjK3Ywn3ptWT5m5VgqkxgjSZofVnqYFK7ZTy1wZ1TQMw xI06NKf0JRDkEer3SrcSRKJ9PP3f6wcwbUMX25tuFKP//3PL+F9utdaP+FooL4Eta/AM hSKA== X-Gm-Message-State: AOAM533pEBkMlTq50r6qWOCn6ZrFeN/4VGuI8/5TfiFBX00FO43w6+7Q pj3+uaStITsSPbKXohR8wBA= X-Google-Smtp-Source: ABdhPJzZDhE7Aahu3ziMYV875Hv9JwSJhpXDe1LUjzRsfoohFLldhmuteIYlUVaI4kvxKhaQGuO/KA== X-Received: by 2002:a2e:a782:: with SMTP id c2mr4532555ljf.381.1631793847055; Thu, 16 Sep 2021 05:04:07 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id h8sm243010lfk.227.2021.09.16.05.04.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 05:04:06 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Andrew Lunn , Vivien Didelot , Vladimir Oltean , "David S . Miller" , Jakub Kicinski Cc: Florian Fainelli , netdev@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH net-next 1/4] net: dsa: b53: Include all ports in "enabled_ports" Date: Thu, 16 Sep 2021 14:03:51 +0200 Message-Id: <20210916120354.20338-2-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210916120354.20338-1-zajec5@gmail.com> References: <20210916120354.20338-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Rafał Miłecki Make "enabled_ports" bitfield contain all available switch ports including a CPU port. This way there is no need for fixup during initialization. For BCM53010, BCM53018 and BCM53019 include also other available ports. Signed-off-by: Rafał Miłecki --- drivers/net/dsa/b53/b53_common.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 604f54112665..47a00c5364c7 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -2302,7 +2302,7 @@ static const struct b53_chip_data b53_switch_chips[] = { .chip_id = BCM5325_DEVICE_ID, .dev_name = "BCM5325", .vlans = 16, - .enabled_ports = 0x1f, + .enabled_ports = 0x3f, .arl_bins = 2, .arl_buckets = 1024, .imp_port = 5, @@ -2313,7 +2313,7 @@ static const struct b53_chip_data b53_switch_chips[] = { .chip_id = BCM5365_DEVICE_ID, .dev_name = "BCM5365", .vlans = 256, - .enabled_ports = 0x1f, + .enabled_ports = 0x3f, .arl_bins = 2, .arl_buckets = 1024, .imp_port = 5, @@ -2324,7 +2324,7 @@ static const struct b53_chip_data b53_switch_chips[] = { .chip_id = BCM5389_DEVICE_ID, .dev_name = "BCM5389", .vlans = 4096, - .enabled_ports = 0x1f, + .enabled_ports = 0x11f, .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, @@ -2338,7 +2338,7 @@ static const struct b53_chip_data b53_switch_chips[] = { .chip_id = BCM5395_DEVICE_ID, .dev_name = "BCM5395", .vlans = 4096, - .enabled_ports = 0x1f, + .enabled_ports = 0x11f, .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, @@ -2352,7 +2352,7 @@ static const struct b53_chip_data b53_switch_chips[] = { .chip_id = BCM5397_DEVICE_ID, .dev_name = "BCM5397", .vlans = 4096, - .enabled_ports = 0x1f, + .enabled_ports = 0x11f, .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, @@ -2366,7 +2366,7 @@ static const struct b53_chip_data b53_switch_chips[] = { .chip_id = BCM5398_DEVICE_ID, .dev_name = "BCM5398", .vlans = 4096, - .enabled_ports = 0x7f, + .enabled_ports = 0x17f, .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, @@ -2380,7 +2380,7 @@ static const struct b53_chip_data b53_switch_chips[] = { .chip_id = BCM53115_DEVICE_ID, .dev_name = "BCM53115", .vlans = 4096, - .enabled_ports = 0x1f, + .enabled_ports = 0x11f, .arl_bins = 4, .arl_buckets = 1024, .vta_regs = B53_VTA_REGS, @@ -2394,7 +2394,7 @@ static const struct b53_chip_data b53_switch_chips[] = { .chip_id = BCM53125_DEVICE_ID, .dev_name = "BCM53125", .vlans = 4096, - .enabled_ports = 0xff, + .enabled_ports = 0x1ff, .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, @@ -2436,7 +2436,7 @@ static const struct b53_chip_data b53_switch_chips[] = { .chip_id = BCM53010_DEVICE_ID, .dev_name = "BCM53010", .vlans = 4096, - .enabled_ports = 0x1f, + .enabled_ports = 0x1bf, .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, @@ -2478,7 +2478,7 @@ static const struct b53_chip_data b53_switch_chips[] = { .chip_id = BCM53018_DEVICE_ID, .dev_name = "BCM53018", .vlans = 4096, - .enabled_ports = 0x1f, + .enabled_ports = 0x1bf, .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, @@ -2492,7 +2492,7 @@ static const struct b53_chip_data b53_switch_chips[] = { .chip_id = BCM53019_DEVICE_ID, .dev_name = "BCM53019", .vlans = 4096, - .enabled_ports = 0x1f, + .enabled_ports = 0x1bf, .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, @@ -2634,7 +2634,6 @@ static int b53_switch_init(struct b53_device *dev) dev->cpu_port = 5; } - dev->enabled_ports |= BIT(dev->cpu_port); dev->num_ports = fls(dev->enabled_ports); dev->ds->num_ports = min_t(unsigned int, dev->num_ports, DSA_MAX_PORTS); From patchwork Thu Sep 16 12:03:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 513509 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 2E5D9C433F5 for ; Thu, 16 Sep 2021 12:04:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 12ECC61251 for ; Thu, 16 Sep 2021 12:04:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238958AbhIPMFe (ORCPT ); Thu, 16 Sep 2021 08:05:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238947AbhIPMFd (ORCPT ); Thu, 16 Sep 2021 08:05:33 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EE89C061764 for ; Thu, 16 Sep 2021 05:04:12 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id g1so17517833lfj.12 for ; Thu, 16 Sep 2021 05:04:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tavpQkYuy52OCAShN3NPMI9ZYShoBfhaEMeVmVE/1KY=; b=q4C25UGJusCW19Pdj64ThhcZXC5vfuDrZ7zSXxrVqsAJzJk5wbqi4wEwMaeM/0vvNW BmokrpXJMxgFe4BhzA2Oy4dbwIcR+ytRpSVydQrPXxx0OlFM0gETqmKDiYTfiNTzTkeF dgtBv6F4B05p+90fk2z9QGw53alXLBACbKzv25Htr/LE0uEvSrEfQtvDXsg+USyy+eeq tQa4DSQMpPIcYUS9ZH5SVWhoU7Hr7HhBtg5BtjVLi+1D01yLzCsq2GP95BNw+BwAvkSt JjbdHc6tD8jqzT+U4E923nPL5cU3hGlVX/jh+gqCSEJn3x7M8hnnujNCzG6uxrEXATIT ng2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tavpQkYuy52OCAShN3NPMI9ZYShoBfhaEMeVmVE/1KY=; b=rFF4ppYKeYA4koMshOEwbqE5Inp+uTxa5nZ9cfs8VBLkGZttaFZnOiUHQp5FA4EOw7 8VyPh+idP9V50yqHQ0gPeHqn0BgM3dMkUjNVuFELzDlK8dpUzCfHBXc9C6PRM4SwmF1A QulIirNp8uUdowqmgMcqXrXr7A/zoBtCUi1ecd48xqYbt28XIJwv5CojEkjzz4b8aIXi Ma0UMPOTVhtJOfqQ6ZC45eXvC7NaPdrsYDQrJgKJZ1DMqDHtXTWy/uQGefnfBKXsorge MR6+BXUk04qYjVMXJWSsSYtsnO7xy0dYIVPNSjU2wFh2YK4HGmSC5wGBVmZPnvRgzlvz 8slg== X-Gm-Message-State: AOAM533ik4H/zIZcpwYQIzO/2nd2UahM1KLvcs2OyxkcerF+MLVwndBf 4/JZcXGWNgGCP/GZpxpm84Q= X-Google-Smtp-Source: ABdhPJzv8hMzTMEzdoWAXEan6debKSfQfFlUSqr0dtebLdfPBHgNGQOFk4cPXXTUpP2175cNXy0CXw== X-Received: by 2002:a19:6b13:: with SMTP id d19mr3766848lfa.344.1631793850747; Thu, 16 Sep 2021 05:04:10 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id h8sm243010lfk.227.2021.09.16.05.04.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 05:04:10 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Andrew Lunn , Vivien Didelot , Vladimir Oltean , "David S . Miller" , Jakub Kicinski Cc: Florian Fainelli , netdev@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH net-next 3/4] net: dsa: b53: Improve flow control setup on BCM5301x Date: Thu, 16 Sep 2021 14:03:53 +0200 Message-Id: <20210916120354.20338-4-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210916120354.20338-1-zajec5@gmail.com> References: <20210916120354.20338-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Rafał Miłecki According to the Broadcom's reference driver flow control needs to be enabled for any CPU switch port (5, 7 or 8 - depending on which one is used). Current code makes it work only for the port 5. Use dsa_is_cpu_port() which solved that problem. Signed-off-by: Rafał Miłecki --- drivers/net/dsa/b53/b53_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index ca84e32baca0..13f337a102ba 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -1222,7 +1222,7 @@ static void b53_adjust_link(struct dsa_switch *ds, int port, return; /* Enable flow control on BCM5301x's CPU port */ - if (is5301x(dev) && port == dev->cpu_port) + if (is5301x(dev) && dsa_is_cpu_port(ds, port)) tx_pause = rx_pause = true; if (phydev->pause) { From patchwork Thu Sep 16 12:03:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 513508 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 3EF5FC433F5 for ; Thu, 16 Sep 2021 12:04:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 29F3F61279 for ; Thu, 16 Sep 2021 12:04:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238974AbhIPMFg (ORCPT ); Thu, 16 Sep 2021 08:05:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238964AbhIPMFe (ORCPT ); Thu, 16 Sep 2021 08:05:34 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49397C061766 for ; Thu, 16 Sep 2021 05:04:14 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id p29so17539727lfa.11 for ; Thu, 16 Sep 2021 05:04:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XXKmfRFVey/uw+NSWuGju096WFCN34iuJIeJ4gsgCr8=; b=Rb1NN0rmmk11kc50N3WTOEI546nP9b9WbJCv3Lt5QmMrvMH+JPa06HuhXor0dUoA8i ugSpe4whvO1Yr5gvfFdfNxtJLw9/cCIvnaD06U2dzp+xDX6058ooetaLN+Nlkc7PRlEf i++8Wu/J7nhyxlMD+o6SZodk/h0mf0/4UY97AcgQrh03LV7tV7h7aZ3nWkI1Fiu5t7/y c/DLNm6vQvgc/ve85EMLLsI/ByZO92pT8kXp5VGktuPKNcN2R8cwkt99rU+jBgqK53BP QAzkIBiofzMcc1PsL9Nupjt7kkH0Bfx9oie6hJj5pNV610PNwumKJ9seQMcoRCg5B+4R hijA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XXKmfRFVey/uw+NSWuGju096WFCN34iuJIeJ4gsgCr8=; b=6rgNsJ7m2+t3ocoEFZk04bO+G9K1KBUu3eloEI/Trn9EMwrRIfuT7/smXhK2F5afCe HijEVovZELM+SRs83FeqOFnKjEWStYdWnaw9Gj5pk3rc1XEomjzrKt2YUAUWRYtzLZRS Qe3G+XGNnE0VfZIZuTbsNZF51rYKaO6PgfEksbNTs3yUlaeUWy+4waRXuDWdAyA90Sm9 PxJ1mnda2zinjQnte1+TIL13tPQGUkTXyCUwESbAD+8N6LOXTIvBwmuOAMBzvA8u5xG+ qIFCQysiEfL/NXhjmH1pcMOs97rMRZILYS/U/aCwSbU2mC7pnuMW8X3uU2WrUgMcgWO9 z5MQ== X-Gm-Message-State: AOAM533QW7msvYWb73a0VtJbAEmh4VKv8VQYZYb2tRe9+VKBTXTWbSU3 exA2UgMF3SDIOo5y3wCBCXA= X-Google-Smtp-Source: ABdhPJx3nLXIFoo1AnVhg83GSSOZUrZq7i3ZCfBcBrdyklS2ZtFI8p5hSuUrPAlJILZRh8Y12HaGTQ== X-Received: by 2002:ac2:5a02:: with SMTP id q2mr855988lfn.285.1631793852475; Thu, 16 Sep 2021 05:04:12 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id h8sm243010lfk.227.2021.09.16.05.04.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 05:04:12 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Andrew Lunn , Vivien Didelot , Vladimir Oltean , "David S . Miller" , Jakub Kicinski Cc: Florian Fainelli , netdev@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH net-next 4/4] net: dsa: b53: Drop unused "cpu_port" field Date: Thu, 16 Sep 2021 14:03:54 +0200 Message-Id: <20210916120354.20338-5-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210916120354.20338-1-zajec5@gmail.com> References: <20210916120354.20338-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Rafał Miłecki It's set but never used anymore. Signed-off-by: Rafał Miłecki --- drivers/net/dsa/b53/b53_common.c | 28 ---------------------------- drivers/net/dsa/b53/b53_priv.h | 1 - 2 files changed, 29 deletions(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 13f337a102ba..06279ba64cc8 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -2300,7 +2300,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 2, .arl_buckets = 1024, .imp_port = 5, - .cpu_port = B53_CPU_PORT_25, .duplex_reg = B53_DUPLEX_STAT_FE, }, { @@ -2311,7 +2310,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 2, .arl_buckets = 1024, .imp_port = 5, - .cpu_port = B53_CPU_PORT_25, .duplex_reg = B53_DUPLEX_STAT_FE, }, { @@ -2322,7 +2320,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT, .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2336,7 +2333,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT, .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2350,7 +2346,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT, .vta_regs = B53_VTA_REGS_9798, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2364,7 +2359,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT, .vta_regs = B53_VTA_REGS_9798, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2379,7 +2373,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_buckets = 1024, .vta_regs = B53_VTA_REGS, .imp_port = 8, - .cpu_port = B53_CPU_PORT, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, .jumbo_size_reg = B53_JUMBO_MAX_SIZE, @@ -2392,7 +2385,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT, .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2406,7 +2398,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT, .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2420,7 +2411,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT, .vta_regs = B53_VTA_REGS_63XX, .duplex_reg = B53_DUPLEX_STAT_63XX, .jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX, @@ -2434,7 +2424,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */ .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2448,7 +2437,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */ .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2462,7 +2450,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */ .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2476,7 +2463,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */ .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2490,7 +2476,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */ .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2504,7 +2489,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT, .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2518,7 +2502,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT, .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2533,7 +2516,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 256, .imp_port = 8, - .cpu_port = 8, /* TODO: ports 4, 5, 8 */ .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2547,7 +2529,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 1024, .imp_port = 8, - .cpu_port = B53_CPU_PORT, .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2561,7 +2542,6 @@ static const struct b53_chip_data b53_switch_chips[] = { .arl_bins = 4, .arl_buckets = 256, .imp_port = 8, - .cpu_port = B53_CPU_PORT, .vta_regs = B53_VTA_REGS, .duplex_reg = B53_DUPLEX_STAT_GE, .jumbo_pm_reg = B53_JUMBO_PORT_MASK, @@ -2587,7 +2567,6 @@ static int b53_switch_init(struct b53_device *dev) dev->vta_regs[2] = chip->vta_regs[2]; dev->jumbo_pm_reg = chip->jumbo_pm_reg; dev->imp_port = chip->imp_port; - dev->cpu_port = chip->cpu_port; dev->num_vlans = chip->vlans; dev->num_arl_bins = chip->arl_bins; dev->num_arl_buckets = chip->arl_buckets; @@ -2619,13 +2598,6 @@ static int b53_switch_init(struct b53_device *dev) break; #endif } - } else if (dev->chip_id == BCM53115_DEVICE_ID) { - u64 strap_value; - - b53_read48(dev, B53_STAT_PAGE, B53_STRAP_VALUE, &strap_value); - /* use second IMP port if GMII is enabled */ - if (strap_value & SV_GMII_CTRL_115) - dev->cpu_port = 5; } dev->num_ports = fls(dev->enabled_ports); diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h index 5d068acf7cf8..5be8fe000037 100644 --- a/drivers/net/dsa/b53/b53_priv.h +++ b/drivers/net/dsa/b53/b53_priv.h @@ -124,7 +124,6 @@ struct b53_device { /* used ports mask */ u16 enabled_ports; unsigned int imp_port; - unsigned int cpu_port; /* connect specific data */ u8 current_page;