Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 710E0C433F5 for ; Mon, 29 Nov 2021 22:29:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232018AbhK2WdI (ORCPT ); Mon, 29 Nov 2021 17:33:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232332AbhK2WbJ (ORCPT ); Mon, 29 Nov 2021 17:31:09 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C34BBC0698E6 for ; Mon, 29 Nov 2021 14:27:51 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id u11so13350984plf.3 for ; Mon, 29 Nov 2021 14:27:51 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=/KmtMbfeaXHuTAh4g4GRV6pvDUPLEEqbIUrWqrzrkr4=; b=MVciiR/0Lt0NLKjRq9rUA8C0kKeHsKsdf0Qk7wdF1y1yrM0xmZfTFv/X/5yzqZ+9QB vTqZJ4KDLHlujFvzzv1PiPlPgDnDSPt7TffxI7pXBiB3BdQjXuSdy5AF+uGRdaamwIQk mXXVNute8wPzRxjw2nWVMe0cT4ZibcmIoAatoJ4Y1g2ovWmLrXKDhLXBQQ46RbGtXqzn niVALQcT8seeEMznpSq4A1x/40mpUf9Fztc+Oz3YR0c1pSnYkjId2+B2xWPrZ2v0Ao5C c/ljTZThfQVi0S9vhUqt9iAitGGQ25haovbzXuJ9v/GXssRhiVwLb8VCk+DvaBdWqZp5 FP1Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=/KmtMbfeaXHuTAh4g4GRV6pvDUPLEEqbIUrWqrzrkr4=; b=z807xKr4I4aD/W54nh+mhcd2Qq8az3pNAOXKRoQpZdSama/YLSx6Efbg6vY4l884hD beTqbCy3FdYuR5EzfgfXhH9M5lc8GcNL+OFh9jJFASw/qHgs30F2UAXNKqf9EQeR5Taj SAmYewol1IZTl427qh+RTo0p7ecCOBCFHwSd8fAkF7i/H574THIZloeIyPJYCUy5ppf6 xN3qQBF02+0WryJb7fml1unsnVrgdOqxnRDgDSOERv3qnSSPIGPMouJp3AnT3PPJhOfj wBdEMRETgOeHEsv4uGo3l7IN3YtqO3hK5TGSkzq9Zz67qOxJT55JMVKyBRq0aofvQAdO lUxw== X-Gm-Message-State: AOAM533eK1CKfRD3RCaQbEnfHxkpH6VS+sVz4eXXaG37YF28vGdZC9MA tuiXPBToC6j48OLCPK6AbEtbWg== X-Google-Smtp-Source: ABdhPJzFMLhjVLY9yCkfDQgnTgKpGAYN3oXMd2qZQsYSNGPxE+7RvtTX5dk8CU0Oy91xu3uUaBwmoQ== X-Received: by 2002:a17:90b:4a0f:: with SMTP id kk15mr1011991pjb.223.1638224871243; Mon, 29 Nov 2021 14:27:51 -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 i2sm19489983pfg.90.2021.11.29.14.27.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 14:27:50 -0800 (PST) From: Brian Silverman Cc: Brian Silverman , Chandrasekar Ramakrishnan , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Jakub Kicinski , Dong Aisheng , Varka Bhadram , Fengguang Wu , 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 RESEND] can: m_can: Disable and ignore ELO interrupt Date: Mon, 29 Nov 2021 14:26:28 -0800 Message-Id: <20211129222628.7490-1-brian.silverman@bluerivertech.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211109021240.3013-1-brian.silverman@bluerivertech.com> References: <20211109021240.3013-1-brian.silverman@bluerivertech.com> 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