Bug 45791 - [PATCH] mos7840: fix chars_in_buffer
Summary: [PATCH] mos7840: fix chars_in_buffer
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Serial (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Alan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-09 16:00 UTC by Stas Sergeev
Modified: 2016-09-30 21:35 UTC (History)
4 users (show)

See Also:
Kernel Version: 3.6.0-rc1-git and any other
Subsystem:
Regression: No
Bisected commit-id:


Attachments
the fix (1.80 KB, patch)
2012-08-09 16:00 UTC, Stas Sergeev
Details | Diff
the fix (2.33 KB, patch)
2016-09-24 13:21 UTC, Stas Sergeev
Details | Diff

Description Stas Sergeev 2012-08-09 16:00:01 UTC
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.
Comment 1 Alan 2012-08-09 16:48:02 UTC
Looks sensible but it needs a Signed-off-by: and to be posted to linux-usb (cc me by all means)

Alan
Comment 2 Stas Sergeev 2016-09-23 21:41:21 UTC
Hmm, I have probably missed the last
message from Alan, and I think (looking
at the code) that the problem is still there.
Comment 3 Stas Sergeev 2016-09-24 13:21:09 UTC
Created attachment 239621 [details]
the fix

Patch updated.
All sign-offs added.
Comment 4 Johan Hovold 2016-09-30 11:06:57 UTC
This was addressed back in 2012 by commit 5c263b92f828 ("usb:
serial: mos7840: Fixup mos7840_chars_in_buffer()").
Comment 5 Stas Sergeev 2016-09-30 21:35:38 UTC
Thanks.

Note You need to log in before you can comment on or make changes to this bug.