Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp998859pxb; Wed, 1 Sep 2021 14:55:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq3llsAVhWh5+MHbWNzIT7SkatT4kzjIw9dFNutJKBHR8qznS83gTh95GEWxNBswUR3w5k X-Received: by 2002:a17:906:29d0:: with SMTP id y16mr1751342eje.477.1630533334829; Wed, 01 Sep 2021 14:55:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630533334; cv=none; d=google.com; s=arc-20160816; b=vuI8RBnVRJqNomFlCNfExs0v6Kv9oLWuzFPw+9QcUkUOrLtDsSzNP2ANbt9k17AxMh 6VF2hyinAx/n+ohRf2G+mldK6YyGcF4ZAKbuxRShyfc3Qoq45wDe4FoeJ204rhzfta2Q RaZeqv11lHuff+iQXAyM5XtFhNwe+zES6JOBgt/982e+iaTmuPaJQbrlSKZAjLZReeLK BqfODmU+iCrP2ka6hRtwDZuzfg2AxYV6f4exPB25Mk2ubknMtVOY3dQPKmNJ1qtazj/l cgNBlmEi91luVQ0VkouQBd/2pGmNRLWQPQAWag09g18Ye5p250VEyOD9Z0N7M26qUP86 EZXw== 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=hJrr8ePBuCeVYVBUQQ4qh3RIQ7ZpVTPj4Eolla3zMaAFOHOSzEpoZdA9zgLQl5PHV+ GC2yuIAbhy4vQGVE3q2wnU42hzVKbxhuJTSIpVhBjPcb5A9gyKpb5G26GP2v9H2MMhzi j9O3QfDmUfZaqAlSwpFyGvQmmPOcUpu/fdHukjlp/ADqRY2neN9fo5XeE0SrqE81fcdB Tn8oiptPedqOR7FVoeeAmlmxYjBuStQN08O9ILmEWOpoaxmyNjQ/VvxQaOp4Ywejjith lclcDzzZujq4sETUgHJHmeds+g4wzwDUErq+rEP1XuyGhLsvV9VK574fGPyKX7AThwAu pCyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QJ4J5bk1; 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 p14si708500edi.560.2021.09.01.14.55.11; Wed, 01 Sep 2021 14:55:34 -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=QJ4J5bk1; 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 S244477AbhIAMaH (ORCPT + 99 others); Wed, 1 Sep 2021 08:30:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:59362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244442AbhIAM3h (ORCPT ); Wed, 1 Sep 2021 08:29:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 70B1B60F92; Wed, 1 Sep 2021 12:28:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630499315; bh=I/8/ZbWpVpbEdrVwOQYSSYv8537Th8fnrFZEP/HQ+Qk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QJ4J5bk1V3VZTHSZHFBiH7obdOTh4DKD3O6gC083C2gWsxPAXZf+BVW53e7/WXve5 J8gQR3uf8hC8FKNOT6DGLQT5jrQJYXpDe4Ny3oOmJC1CMgRIV/YoZCC8ahbHk/BkBh mgs9mEewwdxuTjlGtV8inb30YnoHMwvIbZbW1giI= 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.14 02/23] 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:47 +0200 Message-Id: <20210901122249.866177164@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210901122249.786673285@linuxfoundation.org> References: <20210901122249.786673285@linuxfoundation.org> User-Agent: quilt/0.66 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) {