archive mirror
 help / color / mirror / Atom feed
From: "Stefan Mätje" <>
To:, Marc Kleine-Budde <>
Cc: "Wolfgang Grandegger" <>,, "Stefan Mätje" <>
Subject: [PATCH 1/1] can: usb: esd_usb2: Fix the interchange of the CAN RX and TX error counters.
Date: Wed, 25 Aug 2021 23:52:27 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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].

Signed-off-by: Stefan Mätje <>
 drivers/net/can/usb/esd_usb2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c
index 7370981e9b34..c6068a251fbe 100644
--- a/drivers/net/can/usb/esd_usb2.c
+++ b/drivers/net/can/usb/esd_usb2.c
@@ -224,8 +224,8 @@ static void esd_usb2_rx_event(struct esd_usb2_net_priv *priv,
 	if (id == ESD_EV_CAN_ERROR_EXT) {
 		u8 state = msg->[0];
 		u8 ecc = msg->[1];
-		u8 txerr = msg->[2];
-		u8 rxerr = msg->[3];
+		u8 rxerr = msg->[2];
+		u8 txerr = msg->[3];
 		skb = alloc_can_err_skb(priv->netdev, &cf);
 		if (skb == NULL) {

  reply	other threads:[~2021-08-25 21:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 21:52 [PATCH 0/1] can: usb: esd_usb2: Fix the interchange of CAN TX and RX error counters Stefan Mätje
2021-08-25 21:52 ` Stefan Mätje [this message]
2021-08-26  6:43 ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).