Re: [PATCH] Revert "USB: serial: ch341: fix character loss at high transfer rates"

From: Willy Tarreau
Date: Tue Aug 24 2021 - 11:07:00 EST


[ removed Cc stable for the rest of the discussion ]

On Tue, Aug 24, 2021 at 03:25:16PM +0200, Johan Hovold wrote:
> Zero-length packets are used to indicate completion of bulk transfers
> that are multiples of the endpoint max-packet size (as per the USB
> spec). Without those the host controller driver doesn't now that the
> transfer is complete and that it should call the driver completion
> callback (and instead waits for the other completion conditions).

Thanks for the explanation. I guess that in my case, given that the
serial port would emit lots of continuous data (e.g. "find /" or "dmesg"),
there's always something pending and the risk that it ends exactly on a
64-byte boundary remained low and never happened in practice.

> It may be possible to configure the device to send ZLPs somehow but
> since there's no public documentation for the protocol that may require
> some reverse engineering.

I totally understand. I'll drop my CH34x adapters and try to figure more
suitable ones (i.e. some which work *by default* under Linux). Their
small footprint was nice but without doc they're only usable for low
speeds :-/

Thanks!
Willy