Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1272584iol; Fri, 10 Jun 2022 04:12:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyG6b0hNvgxNAFDmp78GoLXLl410D/XUeZCyfgQJIZxEdTpxKTAKFtBrCIRUlSCyeH7M6ml X-Received: by 2002:a50:8e58:0:b0:433:2d3b:ed5 with SMTP id 24-20020a508e58000000b004332d3b0ed5mr12631435edx.246.1654859527755; Fri, 10 Jun 2022 04:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654859527; cv=none; d=google.com; s=arc-20160816; b=bXUpMPJy8ZNaR4a7sfrIK0AVcS3jtkVs1Oi80RHQWvzMO+v738NanL+r8d5Fklkzmf OrQI2/s5Yv+dJ8fgSOpr4LD084G7e1E6LGcyHJXat+jHXl7aHS2hBo8K0U+mZanVSnK5 AUab2sSB1Fvny2NktGPfPkZZu2PDvDl/gQG/dchF7XM+xkcBR1LWjt/moVCpEjt9hBLh Dxa/JfE1zIjB5/fGbVgrQ1Lhw7KuIfUr65ajkascAkec6eq7sFoSqrebzR2f75uCQggd dwF1OOHf7xL2UacQDRypQNUPOVMgSqa2IDzsK1vCz/tia+31Fnk7L8B83KfhHmAlyAdZ FHQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=IfnR1CjT7oZYJQJ0YRN15X+QkAjfTczJ8wq9+jYtUww=; b=Q9nPfEFR0cxze0MiGCKIUlXYfs3ymZOwR8oMI/0dd7pAVM8V0X0g2b9FjFcnGm86wy 9hJKpD7D9P5jbNUEiNc/Sg64zN7Jm2RMbCGEMZtEDKT1lpKsZrHM+q+qqwfYgLahfpla KWP9uHw21iTln+vGdre2Js90zAUacS7Quf93eGbmzfV2Ge1E/SY/ccFGeIb9SV0F2yqK iH2F9iZkTGZ9m1mF44foNkz+61+hL/cJGAZj7Tic6Ac07lMdJyncUgLXUKlq7H6NNxX4 AFZ0jY3DKPxC0qzXxjQB9MMhMdNu/KXkdfuhRTKK2XNnJvMGU8TqYuFzkYGbhOEyGVid El+w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x15-20020a056402414f00b004333583d64bsi5876156eda.430.2022.06.10.04.11.42; Fri, 10 Jun 2022 04:12:07 -0700 (PDT) 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 S1348875AbiFJKzG (ORCPT + 99 others); Fri, 10 Jun 2022 06:55:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348793AbiFJKya (ORCPT ); Fri, 10 Jun 2022 06:54:30 -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 5D5594CD74 for ; Fri, 10 Jun 2022 03:51:28 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nzcEU-0000CS-8q; Fri, 10 Jun 2022 12:51:14 +0200 Received: from pengutronix.de (unknown [IPv6:2a01:4f8:1c1c:29e9:22:41ff:fe00:1400]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 775AE91008; Fri, 10 Jun 2022 10:51:10 +0000 (UTC) Date: Fri, 10 Jun 2022 12:51:09 +0200 From: Marc Kleine-Budde To: Dario Binacchi Cc: linux-kernel@vger.kernel.org, Amarula patchwork , michael@amarulasolutions.com, "David S. Miller" , Eric Dumazet , Greg Kroah-Hartman , Jakub Kicinski , Jiri Slaby , Paolo Abeni , Sebastian Andrzej Siewior , Vincent Mailhol , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [RFC PATCH 11/13] can: slcan: add ethtool support to reset adapter errors Message-ID: <20220610105109.he4tiihbxggxhx7f@pengutronix.de> References: <20220607094752.1029295-1-dario.binacchi@amarulasolutions.com> <20220607094752.1029295-12-dario.binacchi@amarulasolutions.com> <20220607105225.xw33w32en7fd4vmh@pengutronix.de> <20220609063813.jf5u6iaghoae5dv3@pengutronix.de> <20220609080112.24bw2764ov767pqc@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fmv4lnkvnggz7rbr" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 --fmv4lnkvnggz7rbr Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 09.06.2022 10:52:03, Dario Binacchi wrote: > > > The help option of slcan_attach and slcand prints " -f (read status > > > flags with 'F\\r' to reset error states)\n" I looked at the sources of > > > the adapter I am using (USBtin, which uses the mcp2515 controller). > > > The 'F' command reads the EFLG register (0x2d) without resetting the > > > RX0OVR and RX1OVR overrun bits. > > > > The Lawicel doc [1] says 'F' is to read the status flags not to clear > > it. However commit 7ef581fec029 ("slcan_attach: added '-f' commandline > > option to read status flags") [2] suggests that there are some adapters > > that the reading of the status flag clears the errors. IMHO the 'F' > > command should be send unconditionally during open. >=20 > When in doubt I would follow the slcand / slcan_attach approach, that don= 't > send the 'F \ r' command by default. We would be more backward compatible > as regards the sequence of commands to be sent to the controller. Ok, keep it this way. Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --fmv4lnkvnggz7rbr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEBsvAIBsPu6mG7thcrX5LkNig010FAmKjIhsACgkQrX5LkNig 010VdggAgzCPnmFDsBxLr+elg2NDIiGGSoOr+fWEHtMIkE37bCM9+3W7Ykh5lb1E /g/eElBH89yLwRVxZfSHuWiu4uFTYflF6/4Jh1sOmOWLHHiFt9XhWDDNw4lOwZ/t Y7gxaOiSgf5lUdcAvpFhBDP75GuH14uP3zeZTdpHbE836gFjXh9gPe5+1MJc6YJb rTD2omTEBR8a01XUzTuooRdCoChRj3ekr7fzVxQZYpLPxnsZVJRabwEfKT4+iEr4 B7HfOdIeqtgVpOMj/hnns99US6Izxzz7gVxZLBH8gucqy3WoietOWZ7VI+tOirE+ JTA0661k6mExdytVRzUMgZRhYVfEGA== =Fqe+ -----END PGP SIGNATURE----- --fmv4lnkvnggz7rbr--