Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2935806rwb; Mon, 15 Aug 2022 14:23:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ZD/d9LNWa1Qz1WonEV4RWoTT2yXxwX53MeBRNiHopf8iRlgLlJzeIC2UAzJLF1TRWB0n7 X-Received: by 2002:a17:902:e849:b0:16e:81c6:2cb7 with SMTP id t9-20020a170902e84900b0016e81c62cb7mr19507580plg.110.1660598593374; Mon, 15 Aug 2022 14:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660598593; cv=none; d=google.com; s=arc-20160816; b=YWDogIc3kQosOF9eK5tmLWmf0YyYFl4Rsf0QeOeYPEQ/dLI12DrKlt1MEtPoZ3SpgB alWrARJZHlzFCQEIvW1LZGaTFxTXEn1lux1K4z8QhsF7P0209oDvPx2alxiVqK5HBHKr LNfnJ3VSadzPG33Yi7XVFNlAFu+pam2OqjiA9HL2o3QT5C1m9M0v2JArAnz8854KSoOt DyqFr8rEWl3PQXVgYdRsdIsCNRtnqHjJ6SOAI6Zhg+5ep0mHlKFd83pRsLlVotcaZISd 0E78z5GwcbjoyjfIL1pfnDBbFiUCuTs7E0jHotI4YdO3FPJXvb15v07bGMbiDZF79fhq a9Ng== 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=NXcdfYAimZhz680soJkRBCAIlYSEzfko65Bg3CVXOyk=; b=Mt2HOdeW3g9wvxSBtr8+B6kjuPYcf3URbxfCjLuLGPJhu74Wq98EaBF8hVK1Wmg7LJ ViD8iyxC3PYZqhs0WmyDzA0qy4jdBpitfAuvK7SvorARaw23DElgPhyO4YLm3PoZwTxR yMqDPFwhh1auZCcK9DOHn81OgF8I+EdGw+q3D5bv6sjqRINWiSlgx8BRsSByrXpGdH0d h1i/XMsDNR4VQXcSe9c1KfkWPuHG02BNpYuvHGblCqoelwRNWMVJNQKRHGcf4Xiwedc5 3/Tx2ZGT0TrRDPwakQd5Fl1nrfnXYG+I1TQHu9lBHivLk7QHvcLZhWqkjEZhuzZU2AXN 0ywg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GJemErAC; 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 i6-20020a635406000000b0041bd09a9c1dsi11585045pgb.536.2022.08.15.14.22.58; Mon, 15 Aug 2022 14:23:13 -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=GJemErAC; 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 S243929AbiHOVUB (ORCPT + 99 others); Mon, 15 Aug 2022 17:20:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344397AbiHOVLl (ORCPT ); Mon, 15 Aug 2022 17:11:41 -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 6AAF474E34; Mon, 15 Aug 2022 12: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 AADE460FAD; Mon, 15 Aug 2022 19:19:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAD8EC433C1; Mon, 15 Aug 2022 19:19:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591162; bh=Ck2+hCrQVgLQVzZ0ToyRALvKkwnPpjmXE+ci7kc4odo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GJemErACgLDcql30+PF9nW2irI92KfQrJFgNmJ7P2WfRJWjTAdagzdw7XDfGdsuGz v//D4QRc2dNAKfGXRL1aAOB8Hy+CqBbBPHbai+BnuN1vz2sHPJIE6ubW79zAJlZjIF 0bfru6idZl4tKZMYZEw/K0WVsGA3OW0yeyvnMz24= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jimmy Assarsson , Vincent Mailhol , Marc Kleine-Budde , Sasha Levin Subject: [PATCH 5.18 0491/1095] can: kvaser_usb_leaf: do not report txerr and rxerr during bus-off Date: Mon, 15 Aug 2022 19:58:10 +0200 Message-Id: <20220815180449.844409080@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 a57732084e06791d37ea1ea447cca46220737abd ] During bus off, the error count is greater than 255 and can not fit in a u8. Fixes: 7259124eac7d1 ("can: kvaser_usb: Split driver into kvaser_usb_core.c and kvaser_usb_leaf.c") Link: https://lore.kernel.org/all/20220719143550.3681-9-mailhol.vincent@wanadoo.fr CC: Jimmy Assarsson Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin --- drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c index cc809ecd1e62..f551fde16a70 100644 --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c @@ -853,8 +853,10 @@ static void kvaser_usb_leaf_rx_error(const struct kvaser_usb *dev, break; } - cf->data[6] = es->txerr; - cf->data[7] = es->rxerr; + if (new_state != CAN_STATE_BUS_OFF) { + cf->data[6] = es->txerr; + cf->data[7] = es->rxerr; + } netif_rx(skb); } -- 2.35.1