Re: [PATCH] mos7840: fix chars_in_buffer() return value

2016-09-29 Thread Stas Sergeev
29.09.2016 13:09, Johan Hovold пишет: On Sat, Sep 24, 2016 at 06:00:57PM +0300, Stas Sergeev wrote: 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. This patch

[PATCH] mos7840: fix chars_in_buffer() return value

2016-09-24 Thread Stas Sergeev
Tested-by tag. The reporter didn't test it, and I don't have the hardware in question. Signed-off-by: Stas Sergeev Reported-by: Caylan Van Larson CC: Caylan Van Larson CC: Alan Cox CC: Johan Hovold CC: Greg Kroah-Hartman CC: linux-usb@vger.kernel.org CC: linux-ker...@vger.ker

Re: [PATCH] mos7840: fix chars_in_buffer() return value

2016-09-24 Thread Stas Sergeev
24.09.2016 16:57, Sergei Shtylyov пишет: Hello. On 9/24/2016 4:47 PM, Stas Sergeev wrote: 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. This patch should fix

[PATCH] mos7840: fix chars_in_buffer() return value

2016-09-24 Thread Stas Sergeev
Tesed-by tag. The reported didn't test it, and I don't have the hardware in question. Signed-off-by: Stas Sergeev Reported-by: Caylan Van Larson CC: Caylan Van Larson CC: Alan Cox CC: Johan Hovold CC: Greg Kroah-Hartman CC: linux-usb@vger.kernel.org CC: linux-ker...@vger.kernel.org --

[PATCH] mos7840: fix chars_in_buffer() return value

2016-09-24 Thread Stas Sergeev
, unfortunately, misses the Tesed-by tag. The reported didn't test it, and I don't have the hardware in question. Signed-off-by: Stas Sergeev Reported-by: Caylan Van Larson CC: Caylan Van Larson CC: Alan Cox CC: Johan Hovold CC: Greg Kroah-Hartman CC: linux-usb@vger.kernel.org CC:

Re: [PATCH 2/7] USB: serial: add generic wait_until_sent implementation

2013-05-08 Thread Stas Sergeev
05.05.2013 22:32, Johan Hovold пишет: Add generic wait_until_sent implementation which polls for empty hardware buffers using the new port-operation tx_empty. The generic implementation will be used for all sub-drivers that implement tx_empty but does not define wait_until_sent. Hi Johan. The

Re: Regression: ftdi_sio is slow (since Wed Oct 10 15:05:06 2012)

2013-05-04 Thread Stas Sergeev
04.05.2013 15:15, Johan Hovold пишет: The query takes longer than the transmit at decent baudrates (>=38k) and under the assumption that flow control isn't causing any delays. But you do have a point, and I have been meaning to look into whether the added overhead of checking the hardware buffer

Re: Regression: ftdi_sio is slow (since Wed Oct 10 15:05:06 2012)

2013-05-04 Thread Stas Sergeev
04.05.2013 00:34, Greg KH пишет: Don't call select for every character :) OK, let me draw an approximate workflow of the setup in question. Lets say we have 3 tty devices, A, B and C. A and B are blazingly fast, while C is a casual usb-serial chip. The app must establish a bidirectional relay be

Re: Regression: ftdi_sio is slow (since Wed Oct 10 15:05:06 2012)

2013-05-03 Thread Stas Sergeev
04.05.2013 00:34, Greg KH пишет: On Fri, May 03, 2013 at 10:27:18PM +0400, Stas Sergeev wrote: 03.05.2013 21:16, Greg KH пишет: Sounds like an application is doing a foolish thing and should stop it. Its not. The app is quering only for _input_ (specifying only read fds to select). But the

Re: Regression: ftdi_sio is slow (since Wed Oct 10 15:05:06 2012)

2013-05-03 Thread Stas Sergeev
03.05.2013 21:16, Greg KH пишет: Sounds like an application is doing a foolish thing and should stop it. Its not. The app is quering only for _input_ (specifying only read fds to select). But the select() in linux is implemented the way that even when it polls for input, it will still call tty_

Re: Regression: ftdi_sio is slow (since Wed Oct 10 15:05:06 2012)

2013-05-03 Thread Stas Sergeev
03.05.2013 20:52, Greg KH пишет: What exactly is the "problem" being seen? OK, the problem is that while select() "stalls", the entire output queue is transmitted, and when the app writes more, there is already a big pause. In fact, the app calls select() before writing every char, so then the d

Re: Regression: ftdi_sio is slow (since Wed Oct 10 15:05:06 2012)

2013-05-03 Thread Stas Sergeev
03.05.2013 20:52, Greg KH пишет: On Fri, May 03, 2013 at 09:38:50PM +0400, Stas Sergeev wrote: 03.05.2013 20:30, Greg KH пишет: We need some way to check the chars in the buffer, is the device you are using just very slow to respond to this request? How slow? Do you have a test case that we

Re: Regression: ftdi_sio is slow (since Wed Oct 10 15:05:06 2012)

2013-05-03 Thread Stas Sergeev
03.05.2013 20:30, Greg KH пишет: We need some way to check the chars in the buffer, is the device you are using just very slow to respond to this request? How slow? Do you have a test case that we can see how it is affected? Greg, unfortunately, I do have nothing. The customer is in CC list, s

[patch] mos7840: fix chars_in_buffer()

2012-08-10 Thread Stas Sergeev
patch. Please review. https://bugzilla.kernel.org/show_bug.cgi?id=45791 Signed-off-by: Stas Sergeev From 02804e64f786d6aaaba54933f7cadd10dff2f497 Mon Sep 17 00:00:00 2001 From: Stas Sergeev Date: Mon, 23 Jul 2012 13:17:40 +0400 Subject: [PATCH] mos7840: fix chars_in_buffer --- drivers/usb/serial