Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2620527pxb; Sun, 17 Oct 2021 20:44:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHt8SZ9MDq1uOcdKbsmKqzQJzOR+l19rSCf9etrTyscYSq8Voh2a+7tzMi0rJihDfEb4M2 X-Received: by 2002:a05:6a00:887:b0:44b:dee9:b7b1 with SMTP id q7-20020a056a00088700b0044bdee9b7b1mr27073281pfj.84.1634528654545; Sun, 17 Oct 2021 20:44:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528654; cv=none; d=google.com; s=arc-20160816; b=KHh7e3q2kSg/jeWRNanl23Uzm0ekukGmZUnxqsG5+i69vR6uuzEJB5RLnGMT0f84Mi 3gAEKGlnTsYJRzwjdP7pIGWfvwt9i8L7UhqodO7+xy3AN0FhJCMGaBqGdQk9IEPQfOLB vy3clrBDegD0KcPjwrJJIS2rRJAbpFDdEJhfKKtkDQtoDyg2DHwnVg/fa7diZ5xCc5Cd 3S+XxI14XxkrgoEYe4cqyMqBq0kTuB5zJGU8BMVVN4geKamPNcwTRqLcFaBaGfLK659m PWK+PQqshjC0qfV9QqFp9lGcAZsJthTgiAymhBUFI6GjULtEsyKtvJIWospLmG1HvFsp 5Jvg== 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=bDkl2KJez73aCvg/KlS5aGqeYxnMD6TMLov8pDBj8+k=; b=o9wTaEayssKO1D/t8ZPAV5kOFvolSWduqtNGP2Dhak1VJd6UcuoP2d75ELQ2BIzb/y fAOtZMhN22e3DyKZXKi04WR1e2QC+Ph/7Ak6wFoAYWEHtsRgQMc4kn4piQAMKYe91Vz9 ECDfkwoGbRBOPIWrlHi8FMoovpK8cucns7IPoiBMeMNkye+q3tEMG4Y43m+/LovdId1F IqCbO3rWeWUVmRIe6V1yGqZmZ3ew/WY+L8M0k9pIRrVhbszmWO0rdHBsxTcUcA4Tbu9W kTuXoUREc30Cf+pGkc05ostsQ6gZjtZlRxKJgAdiyu7TkFBO/AwAcHPgxLJRjPFEFq/4 Mb9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g191si7948588pgc.270.2021.10.17.20.44.02; Sun, 17 Oct 2021 20:44:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234784AbhJQMso (ORCPT + 98 others); Sun, 17 Oct 2021 08:48:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236351AbhJQMsl (ORCPT ); Sun, 17 Oct 2021 08:48:41 -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 1BE55C061768 for ; Sun, 17 Oct 2021 05:46:32 -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 1mc5YS-0006AU-Ks; Sun, 17 Oct 2021 14:46:20 +0200 Received: from pengutronix.de (2a03-f580-87bc-d400-7b24-848c-3829-1203.ip6.dokom21.de [IPv6:2a03:f580:87bc:d400:7b24:848c:3829:1203]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) 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 E8C99695CEF; Sun, 17 Oct 2021 12:46:13 +0000 (UTC) Date: Sun, 17 Oct 2021 14:46:13 +0200 From: Marc Kleine-Budde To: Brandon Maier Cc: Wolfgang Grandegger , "David S. Miller" , Jakub Kicinski , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , "open list:CAN NETWORK DRIVERS" , "open list:NETWORKING DRIVERS" , "moderated list:ARM/Microchip (AT91) SoC support" , open list Subject: Re: [PATCH] can: at91_can: fix passive-state AERR flooding Message-ID: <20211017124613.ttplab5ydklehvxd@pengutronix.de> References: <20211005183023.109328-1-brandon.maier@rockwellcollins.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kt7k6mpieicyhvfv" Content-Disposition: inline In-Reply-To: <20211005183023.109328-1-brandon.maier@rockwellcollins.com> 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 --kt7k6mpieicyhvfv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 05.10.2021 13:30:23, Brandon Maier wrote: > When the at91_can is a single node on the bus and a user attempts to > transmit, the can state machine will report ack errors and increment the > transmit error count until it reaches the passive-state. Per the > specification, it will then transmit with a passive error, but will stop > incrementing the transmit error count. This results in the host machine > being flooded with the AERR interrupt forever, or until another node > rejoins the bus. >=20 > To prevent the AERR flooding, disable the AERR interrupt when we are in > passive mode. Can you implement Bus Error Reporting? | https://elixir.bootlin.com/linux/v5.14/source/include/uapi/linux/can/netl= ink.h#L99 This way the user can control if bus errors, and the ACK error is one of them, should be reported. Bus error reporting is disabled by default. I think enabling AT91_IRQ_ERR_FRAME only if CAN_CTRLMODE_BERR_REPORTING is active should do the trick. 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 | --kt7k6mpieicyhvfv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmFsGxIACgkQqclaivrt 76kR6gf/SZqWy8DDw7I6Pxr3FLEttdavMEKmwFK+1T6ML0EHmsRqwTfbe3ol/eJi CjnED87jezZM1vzfjQ0fWgSrSbY/6SYlk3fASIRLSw/0n3H9WYrzNJLvZwjMtKlH Kw/9yQfGfHBI4FoNdWaYyo8ZSnOPzqjC9+X7/Zn7LCbNPiXw2+G41fGrzh69G6uz AM8vNcBLx+PkF2jUodTBzspvz9auYlCO2VuDCsPIBR1pfCXKuiNjZWXZyGmW5VcR gCykGKvzaCzCEJNxxHZAH7IJ3Zq2Std9e5btHHEim5P5WpLML/ddYxoRfQqgRZqb y7+Vg2AWOXEe7Zsq20czLIoPvjccSA== =FYBd -----END PGP SIGNATURE----- --kt7k6mpieicyhvfv--