Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2695269iof; Wed, 8 Jun 2022 10:05:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSHCNjN8+snhoz1xL/auUrEO3gwwb+JEAjWMRKlE2s/o7IfGYlhGDvXEil9FM/x3K6s/CO X-Received: by 2002:a17:902:ca0b:b0:167:4c4d:7320 with SMTP id w11-20020a170902ca0b00b001674c4d7320mr27545904pld.113.1654707933653; Wed, 08 Jun 2022 10:05:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654707933; cv=none; d=google.com; s=arc-20160816; b=q0CxE9DglpC7fPf2Ra2nmYyEitYNFz8rxqQlS40GjXzYiiHjhUV2Kpm2bLQFdAZExJ hiwv+Q5ljdTKRjHMdlY40OjmY81CYGZNHCzlO5JG1iF//I4fQxBjmts//kfZlArlWMd8 gZdZ7YYCkL2aTk443NiYEKixcEIf6XTQmvt4lSoGgMqcCDvqOU7Cnx/4SlS9ZMi4CpUd /T5Gfy6Giv1jASqlufK3pTSDYt17L7Kg+MG9emC3MoSRoSpfbqdfLToALExzJZ0ysba9 pdfO+yUXHKjgMb8gGmZK1gazOBCDX9M64105BaLPgifuEbEOAmXTWtU0oKzBwV6+XS7H 714A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Nczzxga2VzTI61hjMGVwlFiToqM1MiMF50/6VC0BnkQ=; b=asfZG2JvxkNRiiFeGOb6PiFLSw/t0P/ZIKCZzD5rpr/PttTO+MzLFLgXIlyxp+QZPZ nEH0PzjuvfH2jDTViCW4ukjP1caSl52MgZYrO2VNg679FPaFndMhO6c65mA+Hzsauy62 +23bspbFcxz8MVdLESk39CYir+tNgd8lKSxv8r0dQLnHsyKc8qSnECbGolCc32kGaOjX 8zzUgNpnynQ0mMIIU/QSTiJ1oC/9xy6d7eLMG8JvHr51xHTpmptx46YAgx2RCOukfMhu pahdJWTibqH/UhPOBo2IYtwxeevY7l2wQp5+Eow3hBr+t5cEVQanGddCmZB6I/s6byYD EDSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HI9q91Km; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id pc14-20020a17090b3b8e00b001dcdccd55c4si35626609pjb.100.2022.06.08.10.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 10:05:33 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HI9q91Km; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B05A735751F; Wed, 8 Jun 2022 09:34:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245588AbiFHQeB (ORCPT + 99 others); Wed, 8 Jun 2022 12:34:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343588AbiFHQdY (ORCPT ); Wed, 8 Jun 2022 12:33:24 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE2FA30E752 for ; Wed, 8 Jun 2022 09:33:21 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id u23so34079566lfc.1 for ; Wed, 08 Jun 2022 09:33:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Nczzxga2VzTI61hjMGVwlFiToqM1MiMF50/6VC0BnkQ=; b=HI9q91KmJnodakEMkkvIcxiYFhZNvzMEhXQFmkw2A+WEQNB2WvWMTR52zXEbtXiGC7 Eb8G/wOjNPG4o+Zf4VOC/PTnskLo2rvM/HO2McFqvH3VOfDwp1F73zj3kj2H8Y2Ty1Np GOEiXuyyi8OiCcRkDb3E4hU5I8sGAQia/RdhM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Nczzxga2VzTI61hjMGVwlFiToqM1MiMF50/6VC0BnkQ=; b=CNfLoMUdrj2CGpmor4BRIVYozjgIkpj1srsnJ9R5jNVJipOfI/yptQTcDsnCTgiiMN q/thyZfnsLFdmDiHPdnie8H4Apb/mS+wU+CdEKmvPGo/nSNTJlouTBWgonaw4oaphNlM FDgWVllpHj4AtsTFe8B6EdA0xdg7tNJN0KSsmQmB2cOirdp2FGbQWbdfETWt2csu7p/q 8UurYyP9RNtb1naVvCx+Pj4eDu5e2gg9tgHgKBVQ+PZ4Bye7+5aC8pwN+/6tjXOoBacZ OuKjxrcEYAPkWSQVWC0Sw81oMxmY2ClbE8mAZWBMyuY2JN4rCcuoz7Wz3BzeBPRvkkHj 2CUw== X-Gm-Message-State: AOAM530XZ4AtI4ewkNTrHYC4pv1JNM+ak5v9OtocPrcEmpjacRe3Yd0v lxXffriaV3PaHiwaycFrwZ/XdV1jKvAcNjzqaw7DpA== X-Received: by 2002:a05:6512:3a89:b0:479:52fc:f80a with SMTP id q9-20020a0565123a8900b0047952fcf80amr8910198lfu.120.1654705999913; Wed, 08 Jun 2022 09:33:19 -0700 (PDT) MIME-Version: 1.0 References: <20220607094752.1029295-1-dario.binacchi@amarulasolutions.com> <20220607094752.1029295-12-dario.binacchi@amarulasolutions.com> <20220607105225.xw33w32en7fd4vmh@pengutronix.de> In-Reply-To: <20220607105225.xw33w32en7fd4vmh@pengutronix.de> From: Dario Binacchi Date: Wed, 8 Jun 2022 18:33:08 +0200 Message-ID: Subject: Re: [RFC PATCH 11/13] can: slcan: add ethtool support to reset adapter errors To: Marc Kleine-Budde 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Marc, On Tue, Jun 7, 2022 at 12:52 PM Marc Kleine-Budde wrote: > > 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? 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. Thanks and regards, Dario > > Marc > > -- > 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 | -- Dario Binacchi Embedded Linux Developer dario.binacchi@amarulasolutions.com __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 info@amarulasolutions.com www.amarulasolutions.com