Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1860104rwb; Fri, 19 Aug 2022 10:34:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR4196qyFYMlCo8TcyTBOgaNxcseYaYwzK2tYCK0yILf2mtOt/84I1Smugu3vZqauinYWqKR X-Received: by 2002:a17:90a:db95:b0:1fa:c02b:5e34 with SMTP id h21-20020a17090adb9500b001fac02b5e34mr9513069pjv.159.1660930490656; Fri, 19 Aug 2022 10:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930490; cv=none; d=google.com; s=arc-20160816; b=TRg8ehYSetwqLEXf/KtHZ4EQBzRd/3/urulN/oXkopN737KGo0BrPGofx6W+D0DsCB GdJgmAL6cJM1KUaLkU8HRSR20T+2ubkkbmY0/6xO4HUHmDEAHAEj5OIIhWPLMbhFg1nR VR0quhySUtmAEXWTobn0/hCV775ISSS0/0YXNmJFbyP0bZXM86gCZ1RqBZrvXx4b8F+/ sNGrV5Mr/BvXOvNhZXa763/IhwqcYKP4+AcTm390MNq8LzZl1NHYpC81yEYsuREZyQiA yQJb1/bTk3cG+/VlNLuo9fBNKH3UhRKXzB8VSFjGYgLJzIa3mhS4BwhQdkwEaSQklOUX JPMw== 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=6IUEZ06pWh0RB9zU3RJkjn5FSXDoPzPdg2q26aOf+HQ=; b=YdUtzluyoPUOAphDH9XyCJAXGs2tg2wD54QIDuC+DJo1r+VLHd3liT+jJEcloInH5K SdJsFkBW631p9AHTOW72OQIuEHJ2Xfev8UA7d/2r8qLDDGivV3EfSsJgPJTPKHmCMzqu MgWWnqkU5loZgLQzq3WRhrqE+lIwJo0jXxB+Cbg40L+wJQ/CDmTLyuLCouQPvNdOXpKF yS/T6pQbPP4nEGOfAJDjEsndrJ5zqfDkS/3PmcOx1Wkiogx87pJCZBbHFQFXg3QOEst4 hMGU7ybx5t10dELpBC2uwRAawOw7E0ooTWhZzcko96OoIq7y+kKsW4/Kk27PMnjMnyaR gVFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wolNbPex; 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 f11-20020a056a00238b00b005350ea9796esi4488155pfc.165.2022.08.19.10.34.39; Fri, 19 Aug 2022 10:34:50 -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=wolNbPex; 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 S1351930AbiHSQNl (ORCPT + 99 others); Fri, 19 Aug 2022 12:13:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351519AbiHSQLo (ORCPT ); Fri, 19 Aug 2022 12:11:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7218B113DFC; Fri, 19 Aug 2022 08:57:33 -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 8808F616FD; Fri, 19 Aug 2022 15:57:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72CB4C433C1; Fri, 19 Aug 2022 15:57:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924650; bh=wnngqfsE+bRxrgxv6Enaz7IS0b9Cs5VTQ2A8SW40pXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wolNbPex2RPpYkAFAtKeirAF2Fk+5LzKuBUuH6wiQu7027j/5lewlu9jtjUtUaBrg TMy2UW1QFF0LVryII5KbzcUKRqYHLizBPZsQMpKeBSciFqvRve9ejTMzKMCR1FPusF Kq3sjK3uiRizJUKEjKs4aKWPNt41tOLQlWmF3uKE= 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.10 238/545] can: hi311x: do not report txerr and rxerr during bus-off Date: Fri, 19 Aug 2022 17:40:08 +0200 Message-Id: <20220819153840.008799325@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 7d2315c8cacb..28273e84171a 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