Re: Possible bug in the cp210x kernel driver?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ 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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux