From patchwork Wed Jun 15 22:51:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alvin_=C5=A0ipraga?= X-Patchwork-Id: 12882997 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA662C43334 for ; Wed, 15 Jun 2022 22:51:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350627AbiFOWvl (ORCPT ); Wed, 15 Jun 2022 18:51:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350520AbiFOWve (ORCPT ); Wed, 15 Jun 2022 18:51:34 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F82E5640D for ; Wed, 15 Jun 2022 15:51:33 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id bg6so26128904ejb.0 for ; Wed, 15 Jun 2022 15:51:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pqrs.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TXmIOiKtTji5uvqDZkSqwPGXddUogZT+Gvmhu7MqhdQ=; b=TVX+jPHr+YurZEbSw2Ju/dlh1M5+C97k4A0sYp5OVJWanDOEuDVOa2EkHzN0A691PZ zjKbKTLHR7zaQMlMlZjakkTU14oQrFsnCdc5FAgUSIFyIObWrSoZlMkZ/eSHxta2gMqv Swc43qGqkkf5kbOiQRF5nZe772+0zdPb7I46w= 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=TXmIOiKtTji5uvqDZkSqwPGXddUogZT+Gvmhu7MqhdQ=; b=Yrdz+13mrIFJGyuh0bxbHdoN37BaqEJWZga9gyvEuf59A4vT1JlKOcTmYeVp6v5OS0 KR+eJyjQEsNzVCA3KKNxuKXpda5T1r8EgizEy1tUnufEiT6qRbx4gTn5iltKZpexokLl DMnITzIVwN+mpc07Dv1Q5NPb663czoH5z9KjzvM/ejnPbgPRsr0lSP8dP/rcdv7QW0j6 UdAC/fZplyUq68GHqwM7tSBTF6ScR7A52VzE8EcmCPMRf7RX2irmlFQ5s/YL9a/6pDJA GjLv4APExgE++XrCdT6/Bzse/CukD8sZ1DkHj6NpH0ys2oD7xdXamHynSn3rLLI8KXjR jItw== X-Gm-Message-State: AJIora8krKRSAfTPLCOdDKw4Kmev6DfRsbuOpLPYgTf8zvYm18bULO04 3xxKsM6FaJA+OyJSJwSsvTm+gw== X-Google-Smtp-Source: AGRyM1vHmr4I+TxgXhv9ooyE28pTt2qO4gU18bLAATZW0N6FanBovvFpzj2orl0lAgxZ2YZxhMHg7g== X-Received: by 2002:a17:907:86ac:b0:708:9c4a:c6e9 with SMTP id qa44-20020a17090786ac00b007089c4ac6e9mr1881699ejc.297.1655333491875; Wed, 15 Jun 2022 15:51:31 -0700 (PDT) Received: from localhost.localdomain (80.71.142.18.ipv4.parknet.dk. [80.71.142.18]) by smtp.gmail.com with ESMTPSA id h23-20020aa7c617000000b0042e21f8c412sm371506edq.42.2022.06.15.15.51.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 15:51:31 -0700 (PDT) From: =?utf-8?q?Alvin_=C5=A0ipraga?= To: hauke@hauke-m.de, Linus Walleij , =?utf-8?q?Al?= =?utf-8?q?vin_=C5=A0ipraga?= , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King Cc: Luiz Angelo Daros de Luca , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v3 3/5] net: dsa: realtek: rtl8365mb: correct the max number of ports Date: Thu, 16 Jun 2022 00:51:13 +0200 Message-Id: <20220615225116.432283-4-alvin@pqrs.dk> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220615225116.432283-1-alvin@pqrs.dk> References: <20220615225116.432283-1-alvin@pqrs.dk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Alvin Šipraga The maximum number of ports is actually 11, according to two observations: 1. The highest port ID used in the vendor driver is 10. Since port IDs are indexed from 0, and since DSA follows the same numbering system, this means up to 11 ports are to be presumed. 2. The registers with port mask fields always amount to a maximum port mask of 0x7FF, corresponding to a maximum 11 ports. In view of this, I also deleted the comment. Signed-off-by: Alvin Šipraga Reviewed-by: Luiz Angelo Daros de Luca --- drivers/net/dsa/realtek/rtl8365mb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/dsa/realtek/rtl8365mb.c b/drivers/net/dsa/realtek/rtl8365mb.c index 42afba122bb4..3599fa5d9f14 100644 --- a/drivers/net/dsa/realtek/rtl8365mb.c +++ b/drivers/net/dsa/realtek/rtl8365mb.c @@ -115,8 +115,7 @@ #define RTL8365MB_PHYADDRMAX 7 #define RTL8365MB_NUM_PHYREGS 32 #define RTL8365MB_PHYREGMAX (RTL8365MB_NUM_PHYREGS - 1) -/* RTL8370MB and RTL8310SR, possibly suportable by this driver, have 10 ports */ -#define RTL8365MB_MAX_NUM_PORTS 10 +#define RTL8365MB_MAX_NUM_PORTS 11 #define RTL8365MB_LEARN_LIMIT_MAX 2112 /* valid for all 6-port or less variants */