Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp566855pxb; Wed, 1 Sep 2021 05:29:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdqWhddVCfPxGUErDBAqdQJA9DIw1eMSRxHxhaVbyd3Hj5IfNXC15oeI57bcUh/HWSw4GE X-Received: by 2002:a17:906:3148:: with SMTP id e8mr36331714eje.240.1630499386527; Wed, 01 Sep 2021 05:29:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630499386; cv=none; d=google.com; s=arc-20160816; b=gEGTOBgZ1MTGqOOBVDfQOcIl3zpG2hQIUnjXDm3aasqXglRqmR67s2fELBcxsNCjgC L1YkxVX9vptNgGIsyOHikZEhLT3ZYa+dr984YVjLp6Spa06QEUZzDpRC+DFwywJYE0Md DhTXyPbCdeDWwhNnfAfmuJFRe5+bsx22G/7OSNodnGfKtsRpUqgPHRJ6ooj5M07hxp+q qrXuHWjM8nl08VxD/UXJG68i6GntGAAk/ypSdM3kqTwcIwEl3b7vpIj4PWIy9Aso+kCM tgNqHv4jMcq0Ds8BoGKJXPMFR1UOAKPWX0EwBc2VMQYfBj3VDUFURuVm12wW21pwHesH Liqg== 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=cHg6kPOvqbzNARz6sNxgTJrYqFDh9cs7gpfcNcxo0eQ=; b=rjwwhe103I4yK9aITzIWVoLpcAXXVC0m6PoACWF/GLruSLfvUV9yUXJApM0jBQkE2G 2XRfJ5F/KBIE3UhcVJdFNTeEJopz7x6+0U9Fn7a5EomRQ3jHf4YjyAHrxn+vihF9XbfZ Cl62AdMms61KkxarADg0ZzRFwAlvpCcL2tidcD9UVUGIHr2zqo2NKQW1o16eGfNOFly5 Nt9tswE1UuzMdxeLGI8XpMsGJLTcuaJ93OFN+9CbPoCR3noLaQVMydLTOw2TcIFH3C+U GbbxAPlx/76T+F4uULTOVOvT6uitw+XivLXdgtUDjJphl+zw+Nw5jbP9nYGQuxEORg4z CiXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ZN7/ZW4L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qw28si22412053ejc.608.2021.09.01.05.28.58; Wed, 01 Sep 2021 05:29:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ZN7/ZW4L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S244039AbhIAM13 (ORCPT + 99 others); Wed, 1 Sep 2021 08:27:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:56466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244026AbhIAM12 (ORCPT ); Wed, 1 Sep 2021 08:27:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 732D660F92; Wed, 1 Sep 2021 12:26:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630499192; bh=I/8/ZbWpVpbEdrVwOQYSSYv8537Th8fnrFZEP/HQ+Qk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZN7/ZW4LJ3PKSI75up81qppvLSMCZMbVQAXnYLLhDokrqLUhy1889HHiOOA3KXIMg vWHor7IkXXT3TUk4rfQp9ij4khGQyy2SP6RC3ubzEQpuPnhpW45NiUqgqXmov6aYBj Xp4OnLeRDhmZpB0mNeAbCa+xnLd04ujI9nef5sBc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Stefan=20M=C3=A4tje?= , Marc Kleine-Budde Subject: [PATCH 4.4 01/10] can: usb: esd_usb2: esd_usb2_rx_event(): fix the interchange of the CAN RX and TX error counters Date: Wed, 1 Sep 2021 14:26:15 +0200 Message-Id: <20210901122248.100559220@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210901122248.051808371@linuxfoundation.org> References: <20210901122248.051808371@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Mätje commit 044012b52029204900af9e4230263418427f4ba4 upstream. This patch fixes the interchanged fetch of the CAN RX and TX error counters from the ESD_EV_CAN_ERROR_EXT message. The RX error counter is really in struct rx_msg::data[2] and the TX error counter is in struct rx_msg::data[3]. Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device") Link: https://lore.kernel.org/r/20210825215227.4947-2-stefan.maetje@esd.eu Cc: stable@vger.kernel.org Signed-off-by: Stefan Mätje Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/usb/esd_usb2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/can/usb/esd_usb2.c +++ b/drivers/net/can/usb/esd_usb2.c @@ -236,8 +236,8 @@ static void esd_usb2_rx_event(struct esd if (id == ESD_EV_CAN_ERROR_EXT) { u8 state = msg->msg.rx.data[0]; u8 ecc = msg->msg.rx.data[1]; - u8 txerr = msg->msg.rx.data[2]; - u8 rxerr = msg->msg.rx.data[3]; + u8 rxerr = msg->msg.rx.data[2]; + u8 txerr = msg->msg.rx.data[3]; skb = alloc_can_err_skb(priv->netdev, &cf); if (skb == NULL) {