From patchwork Tue Apr 4 10:18:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 13199510 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 9265DC77B62 for ; Tue, 4 Apr 2023 10:19:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234481AbjDDKTg (ORCPT ); Tue, 4 Apr 2023 06:19:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234426AbjDDKTd (ORCPT ); Tue, 4 Apr 2023 06:19:33 -0400 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 0B73D3AA2 for ; Tue, 4 Apr 2023 03:18:53 -0700 (PDT) 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 1pjdkT-00008D-Uk; Tue, 04 Apr 2023 12:18:45 +0200 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 1pjdkT-008tRs-8O; Tue, 04 Apr 2023 12:18:45 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pjdkR-005nml-Jm; Tue, 04 Apr 2023 12:18:43 +0200 From: Oleksij Rempel To: "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Woojung Huh , Arun Ramadoss Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com Subject: [PATCH net-next v1 0/7] net: dsa: microchip: ksz8: Enhance static MAC table operations and error handling Date: Tue, 4 Apr 2023 12:18:35 +0200 Message-Id: <20230404101842.1382986-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.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: netdev@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This patch series improves the Microchip ksz8 driver by refactoring static MAC table operations for code reuse, implementing add/del_fdb functions, and making better use of error values in ksz8_r_sta_mac_table() and ksz8_w_sta_mac_table(). The changes aim to provide a more robust and maintainable driver with improved error handling. Oleksij Rempel (7): net: dsa: microchip: ksz8: Separate static MAC table operations for code reuse net: dsa: microchip: ksz8: Implement add/del_fdb and use static MAC table operations net: dsa: microchip: ksz8: Make ksz8_r_sta_mac_table() static net: dsa: microchip: ksz8_r_sta_mac_table(): Avoid using error code for empty entries net: dsa: microchip: ksz8_r_sta_mac_table(): Utilize error values from read/write functions net: dsa: microchip: Make ksz8_w_sta_mac_table() static net: dsa: microchip: Utilize error values in ksz8_w_sta_mac_table() drivers/net/dsa/microchip/ksz8.h | 8 +- drivers/net/dsa/microchip/ksz8795.c | 179 ++++++++++++++++--------- drivers/net/dsa/microchip/ksz_common.c | 2 + 3 files changed, 121 insertions(+), 68 deletions(-)