All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stefan Mätje" <stefan.maetje@esd.eu>
To: linux-can@vger.kernel.org, Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "Wolfgang Grandegger" <wg@grandegger.com>,
	netdev@vger.kernel.org, "Stefan Mätje" <stefan.maetje@esd.eu>
Subject: [PATCH 0/1] can: usb: esd_usb2: Fix the interchange of CAN TX and RX error counters
Date: Wed, 25 Aug 2021 23:52:26 +0200	[thread overview]
Message-ID: <20210825215227.4947-1-stefan.maetje@esd.eu> (raw)

In the driver for the esd CAN-USB/2 the CAN RX and TX error counters
were fetched interchanged from the ESD_EV_CAN_ERROR_EXT message and
therefore delivered wrong to the user.

To verify the now correct behavior call the candump tool to print CAN
error frames with extra infos (including CAN RX and TX error counters)
like "candump -e -x can4,0:0,#fffffffff".
Then send a CAN frame to the open (no other node) but terminated CAN
bus. The TX error counter must increase by 8 for each transmit attempt
until CAN_STATE_ERROR_PASSIVE is reached.

Stefan Mätje (1):
  can: usb: esd_usb2: Fix the interchange of the CAN RX and TX error
    counters.

 drivers/net/can/usb/esd_usb2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: cbe8cd7d83e251bff134a57ea4b6378db992ad82
-- 
2.25.1


             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 Stefan Mätje [this message]
2021-08-25 21:52 ` [PATCH 1/1] can: usb: esd_usb2: Fix the interchange of the CAN RX and TX " Stefan Mätje
2021-08-26  6:43 ` [PATCH 0/1] can: usb: esd_usb2: Fix the interchange of CAN TX and RX " 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20210825215227.4947-1-stefan.maetje@esd.eu \
    --to=stefan.maetje@esd.eu \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=wg@grandegger.com \
    --subject='Re: [PATCH 0/1] can: usb: esd_usb2: Fix the interchange of CAN TX and RX error counters' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.