Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3222495rwb; Mon, 15 Aug 2022 21:32:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR4+rq/Z9gAWYVNj4bXouTLxrCbLYJ+znV+qloH/getsaG7YWzzHZC2nVd88CryTqUd9DRpD X-Received: by 2002:a05:6402:528d:b0:440:d769:5908 with SMTP id en13-20020a056402528d00b00440d7695908mr17466728edb.52.1660624342491; Mon, 15 Aug 2022 21:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660624342; cv=none; d=google.com; s=arc-20160816; b=Wn8nKoIHsulDn9w1kdPQQpOMspGUFpX9pWGlDDODqtwTW0vmyZmMNrppPts0Vd5QlD XQqimH4vm3KRnj0rJpzeecEZNuYaNk7t564h2zFIY/Mi00qaKhIbVqL0gxkszM5qQvmu JO62rH6X7rnJ6IQDmCh1kGYHGP4CEUAmgSdCbOBX6XB5yd/GT8mByahk8tg53XrrbyVE +y3hLbVSODOKyyWs9m7PAHYULdQWdPDWazW8e9O7PupouGkjd0RLphiLrKxagKXcM6w2 C0k1tme1OtHUFDAb5lVNft4FY6ne/PcHw+n7hvuhLHlrO9VpTbYOmUDBrgjKhlOX7Lxx 51vw== 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=L21NvT/u0vy80GYfFEFRRG4/WOAl5stCNEj080aNQ38V7lKXjzNaJ3dSUxNiEn/Sxg NAdgBCCLRjnBzCcq28Owb87qoK4Ms2ZCe/9Z93BM7OP35qSoyA6airqelNvKCGOg2Fck Wo42VDBDtEUUAoktmYCkbhbXG8ZYzXbaFyXsDWgr5OA1EXTvfhknBPG0+wOwy6LrUOjF AWVyVuHOc1K8XULcTaYfrDd19Ug5Vx0ApuVf/8aRMrw3Y81V7Ndu/5OR3RPEvm9Hc1BQ s6j8zmqw9TcmjxONhv0iaUB8PH44GJlNacgysN77D/u0AqDPzXZfJ5GrqMhqiX2iOM7F 2hIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eAIWzghY; 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 d13-20020a05640208cd00b0043dccd38228si8387373edz.471.2022.08.15.21.31.56; Mon, 15 Aug 2022 21:32:22 -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=eAIWzghY; 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 S229864AbiHPEaP (ORCPT + 99 others); Tue, 16 Aug 2022 00:30:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbiHPE35 (ORCPT ); Tue, 16 Aug 2022 00:29:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DAA915B175; Mon, 15 Aug 2022 13:17:58 -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 B2621B81135; Mon, 15 Aug 2022 20:17:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D489FC433C1; Mon, 15 Aug 2022 20:17:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594670; bh=Ck2+hCrQVgLQVzZ0ToyRALvKkwnPpjmXE+ci7kc4odo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eAIWzghYXMOFjmlJotjh5t9xpcOQ5ZTKPSSuUHN3vCFIAYPGi1gM71fmvl+nlDbTK 5+fzHydEEKc2/cFnxNxb8fz1lkbcB/x+038yCJqd7OF4rLE3uhNo0GyluevzhvAitJ gY5a015EUxcdBJ9SAYzRW+m7gTEaZ4xbocRncGFs= 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.19 0522/1157] can: kvaser_usb_leaf: do not report txerr and rxerr during bus-off Date: Mon, 15 Aug 2022 19:57:58 +0200 Message-Id: <20220815180500.564140469@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 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