All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Malte Bayer <malte@neo-soft.org>
Cc: linux-usb@vger.kernel.org
Subject: Re: Possible bug in the cp210x kernel driver?
Date: Mon, 20 Sep 2021 10:10:42 +0200	[thread overview]
Message-ID: <YUhCAtQIE5vbD/Vo@hovoldconsulting.com> (raw)
In-Reply-To: <zarafa.6145ee62.586f.6703380702229727@neosoft.neo-soft.org>

[ Adding linux-usb on CC ]

On Sat, Sep 18, 2021 at 03:49:22PM +0200, Malte Bayer wrote:
> Hello Johan,
> 
> I recently had a problem with libdivecomputer fetching a specific dive
> log. After debugging the issue I tracked the problem down to the
> cp210x kernel driver.
> 
> Last year, you submitted a change for "Line status events"
> https://github.com/torvalds/linux/commit/a7207e9835a4f245c8c693170906fda0980273f3The
> 
>  connection to my mares puck pro is established with even parity.
> Every time, the dive computer sends the byte pair 0xEC 0x00 (which in
> my case is valid transmitted data from the connected device to the
> pc), the 0x00 after the 0xEC gets dropped by the driver.
> 
> For reference, please take a look on https://github.com/libdivecomputer/libdivecomputer/issues/22#issuecomment-922067186
> and jefdriesen's answer.
>
> libdivecomputer does raw reads of binary data - therefore I dont think
> that it's a good idea to manipulate the received data stream?

Thanks for the report.

In event mode the device is supposed to replace any '0xec' characters
in the input stream with the string '0xec 0x00', which the driver then
needs to convert back to '0xec'.

But clearly your device doesn't escape '0xec' as expected.

What type of cp210x are you using?

As you already discovered you can disable input parity checking (INPCK)
as a workaround meanwhile.

Johan

       reply	other threads:[~2021-09-20  8:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <zarafa.6145ee62.586f.6703380702229727@neosoft.neo-soft.org>
2021-09-20  8:10 ` Johan Hovold [this message]
     [not found] <zarafa.6148ae0f.4d56.2bc45ad001615f69@neosoft.neo-soft.org>
2021-09-21  8:34 ` Johan Hovold
     [not found] <zarafa.614a0e7a.4925.15cc733978d29bb6@neosoft.neo-soft.org>
2021-09-22 11:28 ` Johan Hovold
2021-09-22 20:25   ` Malte Di Donato
2021-09-23  8:52     ` Johan Hovold

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=YUhCAtQIE5vbD/Vo@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=malte@neo-soft.org \
    --subject='Re: Possible bug in the cp210x kernel driver?' \
    /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.