From mboxrd@z Thu Jan 1 00:00:00 1970 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 8BA50C43334 for ; Thu, 9 Jun 2022 06:38:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231255AbiFIGie (ORCPT ); Thu, 9 Jun 2022 02:38:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230391AbiFIGic (ORCPT ); Thu, 9 Jun 2022 02:38:32 -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 47FAA1EAEE for ; Wed, 8 Jun 2022 23:38:31 -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 1nzBo8-0007b3-Vj; Thu, 09 Jun 2022 08:38:17 +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 D39B38FC19; Thu, 9 Jun 2022 06:38:13 +0000 (UTC) Date: Thu, 9 Jun 2022 08:38:13 +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: <20220609063813.jf5u6iaghoae5dv3@pengutronix.de> References: <20220607094752.1029295-1-dario.binacchi@amarulasolutions.com> <20220607094752.1029295-12-dario.binacchi@amarulasolutions.com> <20220607105225.xw33w32en7fd4vmh@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="meaz6sdtzfonjf73" 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --meaz6sdtzfonjf73 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 08.06.2022 18:33:08, Dario Binacchi wrote: > Hi Marc, >=20 > On Tue, Jun 7, 2022 at 12:52 PM Marc Kleine-Budde wr= ote: > > > > On 07.06.2022 11:47:50, Dario Binacchi wrote: > > > This patch adds a private flag to the slcan driver to switch the > > > "err-rst-on-open" setting on and off. > > > > > > "err-rst-on-open" on - Reset error states on opening command > > > > > > "err-rst-on-open" off - Don't reset error states on opening command > > > (default) > > > > > > The setting can only be changed if the interface is down: > > > > > > ip link set dev can0 down > > > ethtool --set-priv-flags can0 err-rst-on-open {off|on} > > > ip link set dev can0 up > > > > > > Signed-off-by: Dario Binacchi > > > > I'm a big fan of bringing the device into a well known good state during > > ifup. What would be the reasons/use cases to not reset the device? >=20 > Because by default either slcand and slcan_attach don't reset the > error states, but you must use the `-f' option to do so. So, I > followed this use case. Is this a CAN bus error state, like Bus Off or some controller (i.e. non CAN related) error? regards, 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 | --meaz6sdtzfonjf73 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEBsvAIBsPu6mG7thcrX5LkNig010FAmKhlVIACgkQrX5LkNig 010rWwf9HB6gWqOXOHUenNrZwAxcodOEWKf9HqdVYBrIidjm28oCSW9rW7SP/L0C mIA2qgvEybBovK6A7kB1ZEuhlVXdHLn4qvu2iTFEizO0tzw+UV2WvKUwKZkD9OrJ v6A+hZJ7nNA4d/wimUElQO+o9y8QILrJB/phXF7eYBWhf8glUy1ORQiDfX8aqDsf hXtzoFAiT50twWqiU+c76uISfN7gebeiavh2kDm4X3pAZm7nrEOCHwTFp6AjFE9P WhPC+U5zJ9+KO4WN+o9l7BkywxhnpA+1s/29dUdHYvUb73RTEDtnO6rfMAnZS2KN ilgx2QrRLrl9zLGPZqyx0y3z4OKUgQ== =zxmi -----END PGP SIGNATURE----- --meaz6sdtzfonjf73--