Created attachment 77241 [details] the fix The TIOCOUTQ ioctl calls chars_in_buffer(), and some apps depend on a correct behaviour of that. mos7840 implements it wrongly: if you write just one char, TIOCOUTQ will return 32. The attached patch should fix it. But it is not tested: customer reported the problem and fails to test the patch.
Looks sensible but it needs a Signed-off-by: and to be posted to linux-usb (cc me by all means) Alan
Hmm, I have probably missed the last message from Alan, and I think (looking at the code) that the problem is still there.
Created attachment 239621 [details] the fix Patch updated. All sign-offs added.
This was addressed back in 2012 by commit 5c263b92f828 ("usb: serial: mos7840: Fixup mos7840_chars_in_buffer()").
Thanks.