Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp998647pxb; Tue, 9 Nov 2021 03:34:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpuKDaaTGthVppF4YpUk1K/gxFQ85H3bixwZApmS+YPl7guulfxWTuwoJRwEqLXvDUoGwA X-Received: by 2002:a05:6e02:1c0c:: with SMTP id l12mr4687295ilh.84.1636457650657; Tue, 09 Nov 2021 03:34:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636457650; cv=none; d=google.com; s=arc-20160816; b=D/74d2WImkG84f5b7lCXihVRP4Wrj29ApwLr6m+hSSDg/vjeIHllPoTZgLiSRZpCcm DVqmqdNN9QAdBG9/8O6OFc5nTU3tQ1kIy5aS0kijgNRGoxxtzdUWmCAGpj5JCX0wJrGr iHbN5/JE4Psf3y6CwLZQHr+K7UBF2radFwXNrx5ioHcN/cmsfjoaAOG/+kWiWx3D3UqN hgAswAMu+qEEvnXUI0Bm6taBein2KBFcWlbT+tKl3HoNSgwmNNEKpNf7CG1M9TKJcyXy ZjO1RkPf7ny03WJGXrMuYXVLchTVUIqJnCShWXStqY+4lvQl6Mvw8tjN8mXTClG7XWo/ uWmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=/KmtMbfeaXHuTAh4g4GRV6pvDUPLEEqbIUrWqrzrkr4=; b=erJyfmci9Py14LJM9COu+4L2y/+oKoNLvzq/1ax6ANSOhPrj2zQCl0zwql7BXFp3EB pTfGhpIimxqATWVs0SLJSSLYwtig7IAi2DHTQftH9oQg5siNiVyxGZRmuyjFkXoKI2UI ui1mT4YgnQ4fKUcsijM3C6itLMBFfc0g84r37Hnnbi2QqK311CFS611MpkZpHThEdIBG Jq2aNwc4ZrNiJ/Sse37DNt2XBTxEH09Ml6SmTFtVOKKV9RtWKJwATfHo2C99POZKkgjM m/y4q/EZ9RXExq6IvjBP3RyIKP3YZEkoAOqfNGBjrE16f33Z6eT7lswoq7AHNItTC4sU JWdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@bluerivertech.com header.s=google header.b=VWNXSJ7c; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bluerivertech.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n13si1455989ili.16.2021.11.09.03.33.58; Tue, 09 Nov 2021 03:34:10 -0800 (PST) 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; dkim=fail header.i=@bluerivertech.com header.s=google header.b=VWNXSJ7c; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bluerivertech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234937AbhKICP6 (ORCPT + 99 others); Mon, 8 Nov 2021 21:15:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234922AbhKICP6 (ORCPT ); Mon, 8 Nov 2021 21:15:58 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23910C061764 for ; Mon, 8 Nov 2021 18:13:13 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id y1so18068238plk.10 for ; Mon, 08 Nov 2021 18:13:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bluerivertech.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/KmtMbfeaXHuTAh4g4GRV6pvDUPLEEqbIUrWqrzrkr4=; b=VWNXSJ7c9oewp5zwmjgYyTofl8MWUpyO6jYRfVKQMpradF2g0kPx/a5xHL6KxsQ9wK MXAl9nBCktRejGnb+EpaTJXIlrbc/dLc3sDMzl7c8vOh9q9HJphZbsg/jkzuL5Lz1Fd3 Eq8fEQ3T25FrYfXgtaWA5RBiCgHctFnk6ZWeEJoSawDdsHUVsr7MklNomCPrQ9pzQKLS 2Or11Fc21Yzl/NwWgPDPxsseqlQkDKkYlnFK6PrBTUYnwE3FZqTfS4zzkANKXzgh1xvz bQ8/1spX5YWKdjvj26yB2zQATsbg4l5hceLCKGGYoAhmlFH/F66eFFK5KGsr3/0xmRcz agDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/KmtMbfeaXHuTAh4g4GRV6pvDUPLEEqbIUrWqrzrkr4=; b=TFCTstX8MzW3J+pWsuB5aOBE6l+btAQY45rL7CJBm6/XUAW9EKT6t1SyV9roBvCEpZ t9dxRNvcpmSksx8TxsgzDLpGWW1elN61cGGZjfP9tordrUhhh5jdn/GL9GfvxOhQvgf2 3v9jTnrENVnxkGV8hxtC3B4DAmbaaHvydxnZlHlNDhOQl/2woDprMlAktVcSrkK7xxGW vDJv6lSG0FLuFOB/5ypl8n160A+uF69rjCozMrTToSUhks5adi08WBp0C8ATxzvCpbdZ UHB1zS13C2nSgYtka4mDEfBrls+EWEut/ukaHOfyQkgy1huBSbPbESnQbbCwCYErQsuh +WgA== X-Gm-Message-State: AOAM530dhZK9dp2kTD/HE5qzAHyR3qcxkZzOrRX8iBmEPGM9MgM6hduF HmcOoElAG0CTHY6NzVRVgZqJkQ== X-Received: by 2002:a17:902:c412:b0:141:f710:2a94 with SMTP id k18-20020a170902c41200b00141f7102a94mr3465223plk.1.1636423992630; Mon, 08 Nov 2021 18:13:12 -0800 (PST) Received: from localhost.localdomain (c-73-231-33-37.hsd1.ca.comcast.net. [73.231.33.37]) by smtp.gmail.com with ESMTPSA id 95sm576982pjo.2.2021.11.08.18.13.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 18:13:12 -0800 (PST) From: Brian Silverman Cc: Brian Silverman , Chandrasekar Ramakrishnan , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Jakub Kicinski , Varka Bhadram , Fengguang Wu , Dong Aisheng , linux-can@vger.kernel.org (open list:MCAN MMIO DEVICE DRIVER), netdev@vger.kernel.org (open list:NETWORKING DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] can: m_can: Disable and ignore ELO interrupt Date: Mon, 8 Nov 2021 18:12:40 -0800 Message-Id: <20211109021240.3013-1-brian.silverman@bluerivertech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With the design of this driver, this condition is often triggered. However, the counter that this interrupt indicates an overflow is never read either, so overflowing is harmless. On my system, when a CAN bus starts flapping up and down, this locks up the whole system with lots of interrupts and printks. Specifically, this interrupt indicates the CEL field of ECR has overflowed. All reads of ECR mask out CEL. Fixes: e0d1f4816f2a ("can: m_can: add Bosch M_CAN controller support") Signed-off-by: Brian Silverman --- drivers/net/can/m_can/m_can.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 2470c47b2e31..91be87c4f4d3 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -204,16 +204,16 @@ enum m_can_reg { /* Interrupts for version 3.0.x */ #define IR_ERR_LEC_30X (IR_STE | IR_FOE | IR_ACKE | IR_BE | IR_CRCE) -#define IR_ERR_BUS_30X (IR_ERR_LEC_30X | IR_WDI | IR_ELO | IR_BEU | \ - IR_BEC | IR_TOO | IR_MRAF | IR_TSW | IR_TEFL | \ - IR_RF1L | IR_RF0L) +#define IR_ERR_BUS_30X (IR_ERR_LEC_30X | IR_WDI | IR_BEU | IR_BEC | \ + IR_TOO | IR_MRAF | IR_TSW | IR_TEFL | IR_RF1L | \ + IR_RF0L) #define IR_ERR_ALL_30X (IR_ERR_STATE | IR_ERR_BUS_30X) /* Interrupts for version >= 3.1.x */ #define IR_ERR_LEC_31X (IR_PED | IR_PEA) -#define IR_ERR_BUS_31X (IR_ERR_LEC_31X | IR_WDI | IR_ELO | IR_BEU | \ - IR_BEC | IR_TOO | IR_MRAF | IR_TSW | IR_TEFL | \ - IR_RF1L | IR_RF0L) +#define IR_ERR_BUS_31X (IR_ERR_LEC_31X | IR_WDI | IR_BEU | IR_BEC | \ + IR_TOO | IR_MRAF | IR_TSW | IR_TEFL | IR_RF1L | \ + IR_RF0L) #define IR_ERR_ALL_31X (IR_ERR_STATE | IR_ERR_BUS_31X) /* Interrupt Line Select (ILS) */ @@ -810,8 +810,6 @@ static void m_can_handle_other_err(struct net_device *dev, u32 irqstatus) { if (irqstatus & IR_WDI) netdev_err(dev, "Message RAM Watchdog event due to missing READY\n"); - if (irqstatus & IR_ELO) - netdev_err(dev, "Error Logging Overflow\n"); if (irqstatus & IR_BEU) netdev_err(dev, "Bit Error Uncorrected\n"); if (irqstatus & IR_BEC) base-commit: d2f38a3c6507b2520101f9a3807ed98f1bdc545a -- 2.20.1