Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5543460rwl; Mon, 3 Apr 2023 23:17:11 -0700 (PDT) X-Google-Smtp-Source: AKy350aFdLPlBELfxvan4on9Mbh9oodDCxC4s3dCje7f4K3yz1Uv7TQzC3yDhYDfoWgEXNaPRRiN X-Received: by 2002:a17:906:3999:b0:93b:46f7:a716 with SMTP id h25-20020a170906399900b0093b46f7a716mr1031448eje.50.1680589030708; Mon, 03 Apr 2023 23:17:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680589030; cv=none; d=google.com; s=arc-20160816; b=ROQBP7LjGRRuFk0frK6KdAEEiku45oaG8T02d5J+uluD7qRpgGaGDYRwrDsxW3DoOh 2SLmU16iapb4YsAAcF4u4WNmHj8B75FhzUMM7WSJg5KINkP6Mz2OqxhxlKnV/VHQq2/l b/nn6sFUvnmCtWG6QdJspO1Dw9IuTJizVjGqgRhpOwva83PliYmWANKVUxUv6g+xexAn u2fNffegajB8MyBt9l8/nDrahZwBKa3th3BaHiZXAsEqt02X056qpiqJb1vfhpbxqmKe 0MW1tWWq4xecNjM0RIpQsBaSLdB7KMA2VROnQ8kXRfVopCwd5L9wvy+VWT4s7NzFHrE1 P53w== 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=AzfFTtw8E+WpZkowMbGSgzHBbPudN3ybsE67IF0Eq6o=; b=Abwfm9/lYoQvKXVjmqIrSLBHhPDhGyZnxo4wp3E1Eac5lDwC8tX7JF/K+V2+nYDEIi y5MN7P2fW9ZNcRtwZciLybrzdHSq1j0ZCYd7VwXFgYNaXq7ENtEKk8bLZfSl1A7kxzI0 89yuWvxuwvXVqDW5dqOYYsSUTbTn5Xh6+58ATdVQSkiWzq79gCq4vhzXDxXJy1ymn21T sRSjNBrsTCHKz5tqC2jQV4Wv7sCwakVkZWzsCnnMJs/7rr4oacBgKMEJFvocQVHBSKpX ObfpmfpjK0DnHNMKm9LV8fYJ4syifNC6INHeOj4hLQGKA28BpoeSRNYA6fgNNLzr3zBV NhcQ== 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 w14-20020aa7cb4e000000b004fe961ba207si7176858edt.236.2023.04.03.23.16.46; Mon, 03 Apr 2023 23:17:10 -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 S233354AbjDDGPX (ORCPT + 99 others); Tue, 4 Apr 2023 02:15:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232997AbjDDGPW (ORCPT ); Tue, 4 Apr 2023 02:15:22 -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 3F2B72701 for ; Mon, 3 Apr 2023 23:14:56 -0700 (PDT) Received: from moin.white.stw.pengutronix.de ([2a0a:edc0:0:b01:1d::7b] 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 1pjZwS-0007IN-6j; Tue, 04 Apr 2023 08:14:52 +0200 Received: from pengutronix.de (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) 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 33E2A1A5DF0; Tue, 4 Apr 2023 06:14:50 +0000 (UTC) Date: Tue, 4 Apr 2023 08:14:49 +0200 From: Marc Kleine-Budde To: Frank Jungclaus Cc: linux-can@vger.kernel.org, Wolfgang Grandegger , Vincent Mailhol , Stefan =?utf-8?B?TcOkdGpl?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] can: esd_usb: Add support for CAN_CTRLMODE_BERR_REPORTING Message-ID: <20230404-worrisome-cable-9486f6795772@pengutronix.de> References: <20230330184446.2802135-1-frank.jungclaus@esd.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="blqp6dvgfsr376jr" Content-Disposition: inline In-Reply-To: <20230330184446.2802135-1-frank.jungclaus@esd.eu> X-SA-Exim-Connect-IP: 2a0a:edc0:0:b01:1d::7b 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=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 --blqp6dvgfsr376jr Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 30.03.2023 20:44:46, Frank Jungclaus wrote: > Announce that the driver supports CAN_CTRLMODE_BERR_REPORTING by means > of priv->can.ctrlmode_supported. Until now berr reporting always has > been active without taking care of the berr-reporting parameter given > to an "ip link set ..." command. >=20 > Additionally apply some changes to function esd_usb_rx_event(): > - If berr reporting is off and it is also no state change, then > immediately return. > - Unconditionally (even in case of the above "immediate return") store > tx- and rx-error counters, so directly use priv->bec.txerr and > priv->bec.rxerr instead of intermediate variables. > - Not directly related, but to better point out the linkage between a > failed alloc_can_err_skb() and stats->rx_dropped++: > Move the increment of the rx_dropped statistic counter (back) to > directly behind the err_skb allocation. >=20 > Signed-off-by: Frank Jungclaus Applied to linux-can-next Thanks, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung N=C3=BCrnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 | --blqp6dvgfsr376jr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEDs2BvajyNKlf9TJQvlAcSiqKBOgFAmQrwFYACgkQvlAcSiqK BOh28Af+MlH6MoPRA+EDMuSmn+NSuTSQpn2RxD9/UQrTuyig29aUjIMIVuREksym Dn5bVb0C9V43K6TQ767Y9lBuoVRXgXB0fdurVKHxGP0cuABf4DwhAw1UaZFvUH21 G+WUVIHGtamM3WgQ8PR69m3Yay4RRNlxO2W90Elwnf4zZNUJdTXYlQtWZzl2ues1 IlFaEHUE/pEj8ALmTY0kegsYD30tq6hq8u7hpUKk/NmClU2DOyH57yr6g6ziLlng 5scVvajveEkg8F9T01z2tqBjdDJHeJ2lkj81bkXqz+/zT5LQxXXy1w9xQdToaeBA PX4KakMomvaFQhGK5WgP99MKcQkVgQ== =W/Id -----END PGP SIGNATURE----- --blqp6dvgfsr376jr--