On Wed, Dec 14, 2016 at 04:28:07PM +0100, Johan Hovold wrote: > Some CH341 devices appear to require the use of the init vendor command > to set the baud rate and line-control register. Specifically, while > using direct register updates for speed and LCR seem to update those > settings correctly, not using the init command causes received data to > be buffered until a full endpoint-size packet (32 bytes) have been > received (i.e. the init command has some undocumented side-effect we > need). Turns out it is bit 7 in the divisor register which needs to be set in order for CH341A to not buffer incoming data this way. If set, direct register updates works also for these devices. This bit is only set since 4e46c410e050 ("USB: serial: ch341: reinitialize chip on reconfiguration") (in -next), which switched to using the init-vendor command. So it seems we could use a common implementation after all... > On the other hand, some CH340 devices have been reported to require the > use of direct register manipulations to set the line speed, while not > suffering from the above mentioned buffering effect. But I still want to understand what is really going one here before proceeding. Russel, I may send you a couple further diagnostics patches for that, but I'd still be interesting in learning whether this patch worked for you. > Let's use the init vendor command only for CH341 devices to be able to > support also such (quirky?) CH340 devices. Thanks, Johan -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html