From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CB6C18AFF for ; Wed, 24 May 2023 17:32:45 +0000 (UTC) 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 B94E893 for ; Wed, 24 May 2023 10:32:43 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1sLp-00069H-ME; Wed, 24 May 2023 19:32:41 +0200 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1q1sLo-0001yq-DA; Wed, 24 May 2023 19:32:40 +0200 Date: Wed, 24 May 2023 19:32:40 +0200 From: Oleksij Rempel To: "Russell King (Oracle)" Cc: Woojung Huh , Andrew Lunn , Arun Ramadoss , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, UNGLinuxDriver@microchip.com, Eric Dumazet , Vladimir Oltean , kernel@pengutronix.de, Jakub Kicinski , Paolo Abeni , "David S. Miller" Subject: Re: [PATCH net-next v1 1/5] net: dsa: microchip: improving error handling for 8-bit register RMW operations Message-ID: <20230524173240.GA7074@pengutronix.de> References: <20230524123220.2481565-1-o.rempel@pengutronix.de> <20230524123220.2481565-2-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 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 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On Wed, May 24, 2023 at 01:39:53PM +0100, Russell King (Oracle) wrote: > On Wed, May 24, 2023 at 02:32:16PM +0200, Oleksij Rempel wrote: > > This patch refines the error handling mechanism for 8-bit register > > read-modify-write operations. In case of a failure, it now logs an error > > message detailing the problematic offset. This enhancement aids in > > debugging by providing more precise information when these operations > > encounter issues. > > > > Furthermore, the ksz_prmw8() function has been updated to return error > > values rather than void, enabling calling functions to appropriately > > respond to errors. > > What happens when there is an error that affects the current and future > accesses? Does this PHY driver then begin to flood the kernel log? Yes. In the same way as it is done in all ksz_read*/ksz_write* helpers. -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |