Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3091398rwb; Mon, 15 Aug 2022 17:55:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR7YN5OqMp6L1fY5PL1qleHaIrOnNHE2nmt8jyAnpgKdC41tJaA/vrgrf+HPBgB7jkR8kmV9 X-Received: by 2002:a17:907:3f24:b0:730:b83d:3a20 with SMTP id hq36-20020a1709073f2400b00730b83d3a20mr12111666ejc.271.1660611308164; Mon, 15 Aug 2022 17:55:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611308; cv=none; d=google.com; s=arc-20160816; b=YWmOFcPy5Ge2/diW3Bft/KwAZnHwM141+9EemT18AKZ34R51lq5LhU31mtMOg+PkPD 7RfULLSLopFojh6d/v0Enan3iP1lrc4Wmy4214NPLqSqcFXl61wwX2B8ClCRwvSgpsHn BlkRVouhE1daETLaZLVXWal/2VUgwRGF8cxMOiRsb9vjsetbDQSZfsSmSRa+rcinOwmk v9MMLONNxD6hS5d1WfZC1d1ICP0E/xx4JgI9SMeqEjGU7E8mY7d10fMrrclcJdEtVy4U J+4QdfBRA9deZlP0XX3EQZkj2BOBNeqqMOcbjHkDf5/Sf4U9UnX0z08uioxXbmrF5ceP Myng== 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=9iWuIMtj87L6GdRJorPRgL+gOUHGZ+pyeyJywF30U/w=; b=xb2BZYhg5++PwJnGG9Buem8T7u3Wiqr+/N9kmG0zcQmU3BB7xaqHC7uZUdLheDDlzU fzky8/QG9jKBVqz+c/46IKKKNPEKE961aijMYywvRizOkxexTnzzweF4fs/V5CnXpdN+ ZMYPaeNnoiQensjthjXGMG6zplPKIHeIyWIKpvIYqu7JgENg9/l4YsLHhIyuHoxIGQIE VnnLBvmvrKFhvuAUgrjMKC5NnO2iIIDZ1vFK5TcExAGGPwOkBK2VywhYiJcn+pYvixcV oFfkNfTql5yOCoC1qddTVvWbSXRbcb+T5rHrczqXh/Vul35qvVGxj0eEFbwjelnF9psB wauQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qnDJbRqa; 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 dz16-20020a0564021d5000b0043c00b8f130si9116956edb.229.2022.08.15.17.54.42; Mon, 15 Aug 2022 17:55:08 -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=qnDJbRqa; 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 S1356575AbiHPACh (ORCPT + 99 others); Mon, 15 Aug 2022 20:02:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356567AbiHOXyn (ORCPT ); Mon, 15 Aug 2022 19:54:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1ECBA161037; Mon, 15 Aug 2022 13:19:23 -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 4D5136069F; Mon, 15 Aug 2022 20:19:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CA52C433D6; Mon, 15 Aug 2022 20:19:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594761; bh=aNjSJGXnTQe5vLNHB9O7l00/SFkzUdwvPVm8jLD4v0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qnDJbRqaiQEORMa/RSOx7vY3W4k/J6M3NDcpAnJmfOvfZGlWYXJf9pzhqRnYkUEob ErYo5gz5JhdwNuffEEgZo/Cz7J7H7E95uVpi6HDn2faJXx/cFOcSUlqzEwiLr/uCRv xgXu0R4CovbUQXanLJHh8ko+JO4bCg72TnhDhpJw= 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.19 0519/1157] can: hi311x: do not report txerr and rxerr during bus-off Date: Mon, 15 Aug 2022 19:57:55 +0200 Message-Id: <20220815180500.460981215@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 ebc4ebb44c98..bfb7c4bb5bc3 100644 --- a/drivers/net/can/spi/hi311x.c +++ b/drivers/net/can/spi/hi311x.c @@ -667,8 +667,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); @@ -681,6 +679,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