Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp149325iol; Thu, 9 Jun 2022 00:29:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7whluyxHf/f2n2OCG+smw+imy8IfNIR3CZLr+u7cmwfS2aRKhl9+tG/WRLQ8fPon/HghR X-Received: by 2002:a05:6a00:b81:b0:51c:3bfe:7d89 with SMTP id g1-20020a056a000b8100b0051c3bfe7d89mr12768504pfj.31.1654759792559; Thu, 09 Jun 2022 00:29:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654759792; cv=none; d=google.com; s=arc-20160816; b=A1SZYdCghx15UYX4t3/kHNx5YHL3BBWR331b5tzz/GMWIEjNd7cpte50smQd9No/mi KUU6FP9LljRKpL7fLmqpr6BN9xeFw2dqrPSpcOdTBpXC8fS635DFrzakfEqnC9ap5E/d N8nAkyB8hx7H9jNUfJBQCIoM6D5EsCPRxTgYTD1s1d7+eL8J3XOAN7T2VmEOqeHVBUyG DGaXFOxJZ/Qwwrbd35F6nR1yf5Nqst+SUUjV7rLhRgCX2/FBflyk8X5Ozux8+5NxHflw E4GV/uiw+HxcJt44HKnqwax6fsqyAeFzguudWqmzudlmjk079evvj5oE9r2QzUk69Aj5 NKQg== 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=RsrKabb3sYTSO7lRo2z33dur2FxoNTSDyhkhjzofbrg=; b=dipI/nOx+m+4tmJHtMn96d6fkzLwTKYDmJ0SwF83hR36I+bHYQOJIlz4+10m9kwwDo SmeJu3OhAErccUZ2rvoTO09woq81hT+cb23+ZcwP309sJhYZ6txsMAl65CsCipyyNIgP srmO4rXVce/2lncliWR3uLGGHacmySjbwyc3lWcijDIgcBzUuaZ3SdCnGFLkEvSvM497 2Vg3AcoV/ueN4BC4V7dkFtRAV4ypP56TLlAs1CbCt64ShqqSdilW+tdwMXox0KfbE/qr /OHZlBYOy89YxR7z/pxVlkHxbxMIXRltuuTSNbYV/1gKEP8WE9DK441Gid2CSw2t/5/K 0x7Q== 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 t10-20020a17090abc4a00b001c6f8b9aea5si29040783pjv.42.2022.06.09.00.29.40; Thu, 09 Jun 2022 00:29:52 -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 S238486AbiFIGie (ORCPT + 99 others); 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 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 --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--