Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2882743rwb; Mon, 15 Aug 2022 13:14:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR6WoY2C0nU6+yjKnGDTLNgzoQ6H2U7fy8prEcZCvb7ZSla634HDLhtzcQL4Ke/ddYm1VUT8 X-Received: by 2002:a17:907:7b83:b0:730:8649:9836 with SMTP id ne3-20020a1709077b8300b0073086499836mr11537085ejc.0.1660594494953; Mon, 15 Aug 2022 13:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594494; cv=none; d=google.com; s=arc-20160816; b=Bzr1+bGZMAXGug33r7iqYlD+teeGdjEao4FhewklZq8Zz8yBQhPNaA3DNvEK2n2M2H G9Jc1poMY6gzwL5aTl6CNI1l/Hci9vowTwPwIRm8uVOfvItTaReS9w8zmcbVXjNjd+x4 0cusBDqzSB0unKFnqEP2bKVh3jhBxgXa8uc76nwELC3In/pQWfSDbcIIrXxQDb+ERycZ Pv0Q+LqmMJz/KzWDOZwXtiMJXZK4PD6zQpf1z+Uxpm7t3FwqA04iWLJAy+/zXAYZpPfn ZoPJ4GqU8p/RHyLdS98THjJF8KHK12lssVvvUYsQoDlrChw+3DrD1BPj5hjYoJqiKF2w vYgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/VAy2n32UXzFQ9cn7gk98NRmD4PNGqqBp4UPgHTbaOA=; b=m5v0YvRDa7mBiSj0runv3KR3heWTi6zBw+dI5S32Yf0vyHlmsG7tHlwmkOZ0uvoDz3 3G0W4Gpd9hKTuyG69QHUDguRYqyFbZW4Zrvcgn0vd0y3W/wTlh/YMZz/LALtA15MtvvK ys7Ag0Z4oVBWwLwdNi7mLyrxTmWm6Oa8xapQPz4AM/2HBm/qCO15C4FqAiULzXn/Bjo5 PnUyptg4r8aJYP0Lkp+mN/h2t8yNALf6AZSQpubJ8vjNpVCsZTf8+Lry/jAtK5nS6wBt fIa55ZYn6ZxXPUxj0r3KnhidkXRtpchTPEw6YsXEL46a5UODcDjkMvqI4XG7u1oJ6eN3 6mMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bgIYQE6G; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs28-20020a1709073e9c00b0073318653cb0si10785476ejc.759.2022.08.15.13.14.29; Mon, 15 Aug 2022 13:14:54 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bgIYQE6G; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244969AbiHOTAY (ORCPT + 99 others); Mon, 15 Aug 2022 15:00:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245074AbiHOS4i (ORCPT ); Mon, 15 Aug 2022 14:56:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48B1D2CC87; Mon, 15 Aug 2022 11:31:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D9FC161043; Mon, 15 Aug 2022 18:31:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C87D1C433C1; Mon, 15 Aug 2022 18:31:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588290; bh=PV0DCN/w6gznVYgw07YsdZ7KKqqykyP06skBcW/arXc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bgIYQE6GpXj4rLMw03U92swR+wqAVg4fe+tCbyOUQJf/oWoIophzOgTem9RkAqTFF iPoN8C2Y6Ok4jyJ9RBbEiGmCnQpPVzR2EIeAA1uyOy960hmt5Y+k3k9N6zzSAKjtTU q9dPx1O1u73VCeKmnBk/ce90PB8ZHw5F86vul/00= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vincent Mailhol , Marc Kleine-Budde , Sasha Levin Subject: [PATCH 5.15 354/779] can: hi311x: do not report txerr and rxerr during bus-off Date: Mon, 15 Aug 2022 19:59:58 +0200 Message-Id: <20220815180352.368672380@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Vincent Mailhol [ Upstream commit a22bd630cfff496b270211745536e50e98eb3a45 ] During bus off, the error count is greater than 255 and can not fit in a u8. Fixes: 57e83fb9b746 ("can: hi311x: Add Holt HI-311x CAN driver") Link: https://lore.kernel.org/all/20220719143550.3681-6-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin --- drivers/net/can/spi/hi311x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/spi/hi311x.c b/drivers/net/can/spi/hi311x.c index 89d9c986a229..b08b98e6ad1c 100644 --- a/drivers/net/can/spi/hi311x.c +++ b/drivers/net/can/spi/hi311x.c @@ -670,8 +670,6 @@ static irqreturn_t hi3110_can_ist(int irq, void *dev_id) txerr = hi3110_read(spi, HI3110_READ_TEC); rxerr = hi3110_read(spi, HI3110_READ_REC); - cf->data[6] = txerr; - cf->data[7] = rxerr; tx_state = txerr >= rxerr ? new_state : 0; rx_state = txerr <= rxerr ? new_state : 0; can_change_state(net, cf, tx_state, rx_state); @@ -684,6 +682,9 @@ static irqreturn_t hi3110_can_ist(int irq, void *dev_id) hi3110_hw_sleep(spi); break; } + } else { + cf->data[6] = txerr; + cf->data[7] = rxerr; } } -- 2.35.1