Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3475523rwa; Tue, 23 Aug 2022 05:29:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR7OZGLHtCWljnP2PeQpq+O5E3Qvs9yOvpMPD7yZkxAODx+lmlkdSQ/uWnF7yFsqfBX2OB3J X-Received: by 2002:a17:90b:1c01:b0:1f3:2f26:e7b2 with SMTP id oc1-20020a17090b1c0100b001f32f26e7b2mr3148006pjb.111.1661257798234; Tue, 23 Aug 2022 05:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661257798; cv=none; d=google.com; s=arc-20160816; b=h8GDctTvl2X4e54EC1aPMOxTEghQMtiAizzK01WHivpRafYrm+GSGUn7OBJyQdxW/w dXUsIK3SxFWHwPcCmXUc3nYyhD/WHsUPY+iAqDHYseNbUJILjuAQchqLay0HY5f9uOOX OXQPcymfX7b9+Aqx8zoZky59z65twhyuh2e0H6jigjSHjOySQggfOkIJD1J6qsGmTZtv Oy8Xie5CBZeNyRktBpgXiuR1JujnZBLIe3f0reI9jr+vfbrFX3G8z7utHfiBhFPlx1af p5GS/rR7+/tNE5+uFx6ikMdU/IldZCB6isrJ2upsEJNDn8OARmvzCJrFuYh7HW4A0VMN kdMw== 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=jFFODdIPMbm6Z1Xth641e7Wd6zGEvH6PfRSbwmuIakSjEovHk08DcOBofGGM25QF6Y QJ/VaUmdgKRy6FB6XBaCLUTlayiHW2dtKLMC8Ly51FdzBcQduGfUHlD1HSVYK/Myraa/ v0tpvFJQAU+iWMdv3vl8ai/t7okCytcf454oVFTVlz/o9n2LI9+MKJerDBAw66/hVGPG vsyQglgwg9IZg80MKTiA7boFnOoOOAfjO1cw5du7GPRjsTsPlFtBsdlAvxBQ4T6llkMV 21+gqjZkT3iIEt5Kz0eIxaSlzz+U4ITQx2wWKIW0cvn7fKykT53LGKl0PELp+ejyuwEG iStw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EUjtMe0Z; 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 a186-20020a6390c3000000b0041cc49c5d6fsi13610086pge.93.2022.08.23.05.29.47; Tue, 23 Aug 2022 05:29:58 -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=EUjtMe0Z; 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 S244405AbiHWL3W (ORCPT + 99 others); Tue, 23 Aug 2022 07:29:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350660AbiHWLXc (ORCPT ); Tue, 23 Aug 2022 07:23:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92D0D2CE27; Tue, 23 Aug 2022 02:23:34 -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 DBAFEB81C65; Tue, 23 Aug 2022 09:23:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 369CFC433D7; Tue, 23 Aug 2022 09:23:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661246611; bh=wnngqfsE+bRxrgxv6Enaz7IS0b9Cs5VTQ2A8SW40pXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EUjtMe0ZAJ7WLeMrhM2b2Wwh5mm4I6IbxiKHJAA7uECGxFJvs2o+GQ2CNPGyOehZT VfBOUvnxiPfAomtstN56sOJPHE9tBgsi/0grcuqm/+orYI1YbUv/lP3WIe1/j1IkGx pGgb7ssKCe70z2/4VTEDZDlVBGfcPFf4UFBor1mg= 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.4 134/389] can: hi311x: do not report txerr and rxerr during bus-off Date: Tue, 23 Aug 2022 10:23:32 +0200 Message-Id: <20220823080121.208629866@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080115.331990024@linuxfoundation.org> References: <20220823080115.331990024@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