Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2879493rwb; Mon, 15 Aug 2022 13:10:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR6jXv9Hhqf5PNHT+fMxyZC2SfElc6e27RGrw20lsvuj55eOIFe0lIxPjN9r6ONcGkznOV2c X-Received: by 2002:a17:906:7953:b0:732:345:ef02 with SMTP id l19-20020a170906795300b007320345ef02mr11668701ejo.24.1660594244443; Mon, 15 Aug 2022 13:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594244; cv=none; d=google.com; s=arc-20160816; b=Hl385eRW71exuYGkDFgWQQ+mEW+8/m1gKk3soSiRxWhrW5dvFly1V9JwP9zroPt7NV Ar9vOo9Iqq2QMxKcF0qVEjcbgFbPAHXptsn9oSLU6kAN5BVCxD1IWPeIOe4v6NVqHhpe CuRp567w3ke+NoN74q+EHOUmbNljwN1s1BxLGIw8Sqcmeem1tpDImu/HtHR3TQXhnvcA HL6kgw03njWFzlGDjgCbe/vKIGKXvvKd0/tJi062wy/6PF2t27xzV7kjn3MPeA+WhsGG xGwBZorh4QUf4pp8iOkrFzVW0h06PDAMt1q66mSR+mXeWd6G4Cfda2zQ2xFwUWPVGIYi vJ+g== 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=EvQyjROQNJm27AWXyt8NFQ0NTrZyvOr7oypk7CbOgpI=; b=YBiVVXhCyT71s3YycdY8BWd5V76zvumdOJrE+23z1DBDj13D+RV9xMI4ekU/lXsnx3 zQIkVoG+OyCijluLgO9sixO+04n9VG6zAj/cUQ/Tm8ZaTMjLeFw9OUnTzpiV+NQPwIG6 4AX4gXhcJnZvfwP0VKNNZzcfoYLH4W2zL0fR4qislxe9JbJWr6Z5wltKyyAcGmOcTtBZ Ekl7015D3Ijyr647dEVznnszMsJcx88AJTwySr/nXdC0MhWCl6eXlTNuo0OlLhiHHemS m9J2dgHElWKUWh6g3UE5qnJGuxEygG85suwm3W60EWBEakB+Y/sIBMe0ZEHiECBx8PCJ y7Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kXndhrkX; 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 m6-20020aa7d346000000b0043d14d03dd9si7362991edr.496.2022.08.15.13.10.18; Mon, 15 Aug 2022 13:10:44 -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=kXndhrkX; 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 S245182AbiHOTDp (ORCPT + 99 others); Mon, 15 Aug 2022 15:03:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245190AbiHOS47 (ORCPT ); Mon, 15 Aug 2022 14:56:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E80E448EAB; Mon, 15 Aug 2022 11:32:01 -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 4B154B8106E; Mon, 15 Aug 2022 18:32:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78E67C433D7; Mon, 15 Aug 2022 18:31:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588318; bh=pmGhTR49xpJP6eRZfxJ44RAp0EPunMj+LF0Cvr6MHvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kXndhrkXXfzaJpByH0+4o547WD5bFalkYKsL628VD2bZGVMHcLcLOmy8zGEYDf+VY CVnDDyg6y9VblbfFWd5wPtLy0976WVWXylrcFxNWnh2qf7/Ftix26wSlCoWFQkwfYS FB7ur0EbzIrg4LvojBTlltE1/SpUBJm6pfgZyK5A= 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.15 357/779] can: kvaser_usb_leaf: do not report txerr and rxerr during bus-off Date: Mon, 15 Aug 2022 20:00:01 +0200 Message-Id: <20220815180352.500916131@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 b9c2231e4b43..05d54c4f929f 100644 --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c @@ -857,8 +857,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; + } stats->rx_packets++; stats->rx_bytes += cf->len; -- 2.35.1