Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3020779rwb; Mon, 15 Aug 2022 16:17:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR6XC8wM0KIap7RHtDK+2voc1f+LTHWUMA+gzxcvgVCpWIavLz2Lp0R0Gtzt4B6SRR/eTgZH X-Received: by 2002:a17:907:2719:b0:730:a688:f1e4 with SMTP id w25-20020a170907271900b00730a688f1e4mr11442346ejk.425.1660605474545; Mon, 15 Aug 2022 16:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605474; cv=none; d=google.com; s=arc-20160816; b=OzxBq3eTo7eByshPnUj5oZj1BQd0O+GF2IoUXDhpn6ZRyr/8wDFdu/UgjMKGMyl3Ot rF7XJXQk4Qv1R3+6Cyk5QjkapI3dAakTgLGOMXrB9gRxsvEemyA75Deunlzy0WUdIqVl KbKdOaT2NiXU8uByW124/tjzF6+KshQV9P+yoqDNminXgESPk6DffQ5QuPnBb4OKckED 4956ZJr6RfHSdmJgCFALGFetTJFd+qDaMGK8Lml06qw+CiKGRaQVA81SupHVijoC8BkG tTuJ7TsI2n3rFN+nNyFsrJ3Skin8Xb5Emo88aZPHcSD69PLwglQbIfOvAgsL8jgrdw5x eJng== 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=xejLTf5cu2lZ88TYOveWKIN8QvfIHrdcF87R1/++hdQ=; b=gXO/UtH5J0aLzBQ/zvCNAeO2/8QLfs+mdaAcfbjFn+pPdOnMi/QvYxN8cNj17zXWsV g0EUzp251g79qXAwv2WnMpufEfGDnPotYy4OGQHU8Q3Q9ArVscEYov4eFffukOJdEeOq I4zRawRK6O3n7u0rZdi3KOYlgs/94H6P6NuesMAfqsF/ofZq+A79Zrz/hQW+uN66B2QJ T2Z1DUtdUQ23yOnuI2N/j28MfR6rjbs7OSnDKXHfKwxx/HamiNNw9Ka4lpuYMkgsjQj9 NWJLC+7s+f1l1yt5gi+1YRcuTouzxPIw1AgkQwyuxqfnEPTuzIZpqH47oC5VIlcRiVW8 ma9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=g1Occ6u9; 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 du8-20020a17090772c800b00733ca35c0a6si9349804ejc.626.2022.08.15.16.17.28; Mon, 15 Aug 2022 16:17: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=g1Occ6u9; 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 S242158AbiHOVTT (ORCPT + 99 others); Mon, 15 Aug 2022 17:19:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343500AbiHOVL1 (ORCPT ); Mon, 15 Aug 2022 17:11:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E79A56B92; Mon, 15 Aug 2022 12:19:15 -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 ams.source.kernel.org (Postfix) with ESMTPS id 92255B810A3; Mon, 15 Aug 2022 19:19:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E233BC433C1; Mon, 15 Aug 2022 19:19:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591152; bh=eOIpwwLug7xaU7xZcpgJ3YxRa4IP5m/bwHHhlYRXlxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g1Occ6u9r28Q7+SkVsjo1PzH6xBKSMxK1YVcEgo25NHUX+uoIkmytXdzF7H8KSfn4 J1Hp6486wFJe6lVpaE9lwEEFKzKQdDUQZOJd+3GxJYYG2hWUHSTGAG5GlwrmztRYkZ L4g08QW6fq5A6mm7lnaX0tffNwQNLUWPWHA0+gQI= 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.18 0488/1095] can: hi311x: do not report txerr and rxerr during bus-off Date: Mon, 15 Aug 2022 19:58:07 +0200 Message-Id: <20220815180449.733238387@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 a5b2952b8d0f..7dc88a9eca0f 100644 --- a/drivers/net/can/spi/hi311x.c +++ b/drivers/net/can/spi/hi311x.c @@ -672,8 +672,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); @@ -686,6 +684,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