From patchwork Thu Nov 24 10:14:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 2169 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3304654wrr; Thu, 24 Nov 2022 02:21:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf7lqVeQ35YY+ognwhe6rjX+7+Whlv7IFCmGz39FzOlzTNNC3sbZpB6j88uRD5uVM47vqO8T X-Received: by 2002:aa7:dbc7:0:b0:45f:b80f:1fe8 with SMTP id v7-20020aa7dbc7000000b0045fb80f1fe8mr28232774edt.118.1669285261360; Thu, 24 Nov 2022 02:21:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669285261; cv=none; d=google.com; s=arc-20160816; b=XXCPojrGQoEhAP0qz4mGjVInF1XXYAMpKQliP69/Pz0fzy3VXio3awC3G8YqJP0Swh j2M5AlJa7rNpgP03g78u5rsyQyPbwi28IAGxvlBl3fGIQhoilTWJ5jpXqUCpQVBOkhPL rWgsh9w007SAQhIO281lBDzBJBhbxF36yriGir+MMnmWTcKDYEyM1D5m6XbdVvNmPWSp gt/drYAdOu8BSqbPgKCKG1wfZtx4q/uGf3uNu2S/G57H7Q+kteLtuxjb+xd72voqmWqX RWOMegJkt+OOb+fak+Nli2bAY5iQ0dUvcpOuwlkIxX6KXYoMbcQP8HG9tDNrU30g64en Ezqg== 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 :message-id:date:subject:cc:to:from; bh=2m59/3zeHqC4pRH1gkIz7U8Nm+XJDEFo/liZPUCnjJI=; b=lb537q3TpqftKztmL6q0OeFi/HSRXcKWZabYCPHE3Wn02jt1fG/eYZ3xabfzRGCrrB 5RtZoxp3Lip/ue05XUXm4xSatqjyZp6NUz5BHIJcjxnkzeqjUlW/9eWh8lEsB3EUoKcq 2CY/IkYdMmiNQf15aTdE1vbQ7TQzmZevgwCyMxo7LQayo4IWZLPFF22UY7P6JWldLS9F u2Cs0E5rgSm0LTUXem9aOvqYL2WhhSDcSaDJeAUBQEgslz3BgcoZEBS5cVoywEgBvdSh x6CLDsn7n5g+uQ+fBjPMxMuhoyER9sFUp4KoIi6ckkCrlv8XD0qPHdMPQ+H5QKgl7OXs Aofw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m29-20020a50999d000000b0046768efb587si506930edb.69.2022.11.24.02.20.36; Thu, 24 Nov 2022 02:21:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229817AbiKXKP3 (ORCPT + 99 others); Thu, 24 Nov 2022 05:15:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229900AbiKXKPO (ORCPT ); Thu, 24 Nov 2022 05:15:14 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F0DEC2878 for ; Thu, 24 Nov 2022 02:15:13 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oy9G4-0004ID-1x; Thu, 24 Nov 2022 11:15:04 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oy9Fz-0000jI-BP; Thu, 24 Nov 2022 11:15:00 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oy9Fz-00E4WF-JQ; Thu, 24 Nov 2022 11:14:59 +0100 From: Oleksij Rempel To: Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Arun.Ramadoss@microchip.com Subject: [PATCH net-next v6 0/6] net: dsa: microchip: add MTU support for KSZ8 series Date: Thu, 24 Nov 2022 11:14:52 +0100 Message-Id: <20221124101458.3353902-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750372462360589782?= X-GMAIL-MSGID: =?utf-8?q?1750372462360589782?= changes v6: - move dsa configuration to ksz8_setup changes v5: - add mtu normalization patch changes v4: - remove per port max_frame cache - remove port variable for ksz88* variants - add KSZ9563_CHIP_ID - not start a new line with an operator changes v3: - rename KSZ8863_LEGAL_PACKET_SIZE -> KSZ8_LEGAL_PACKET_SIZE changes v2: - add ksz_rmw8() helper - merge all max MTUs to one location Oleksij Rempel (6): net: dsa: microchip: move max mtu to one location net: dsa: microchip: do not store max MTU for all ports net: dsa: microchip: add ksz_rmw8() function net: dsa: microchip: ksz8: add MTU configuration support net: dsa: microchip: enable MTU normalization for KSZ8795 and KSZ9477 compatible switches net: dsa: microchip: ksz8: move all DSA configurations to one location drivers/net/dsa/microchip/ksz8.h | 1 + drivers/net/dsa/microchip/ksz8795.c | 75 +++++++++++++++++++++---- drivers/net/dsa/microchip/ksz8795_reg.h | 3 + drivers/net/dsa/microchip/ksz9477.c | 21 +++---- drivers/net/dsa/microchip/ksz9477.h | 1 - drivers/net/dsa/microchip/ksz9477_reg.h | 2 - drivers/net/dsa/microchip/ksz_common.c | 29 ++++++++-- drivers/net/dsa/microchip/ksz_common.h | 13 ++++- 8 files changed, 109 insertions(+), 36 deletions(-)