lkml.org 
[lkml]   [2016]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 16/36] usb: serial: ti_usb_3410_5052: Use bulk_out_size in TIOCGSERIAL
On Thu, May 12, 2016 at 10:48:48AM +0200, Mathieu OTHACEHE wrote:
> Use bulk_out_size instead of recalculate it with kfifo_size
>
> Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
> ---
> drivers/usb/serial/ti_usb_3410_5052.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
> index eb4df1e..5ef721c 100644
> --- a/drivers/usb/serial/ti_usb_3410_5052.c
> +++ b/drivers/usb/serial/ti_usb_3410_5052.c
> @@ -1205,7 +1205,7 @@ static int ti_get_serial_info(struct ti_port *tport,
> ret_serial.type = PORT_16550A;
> ret_serial.line = port->minor;
> ret_serial.port = port->port_number;
> - ret_serial.xmit_fifo_size = kfifo_size(&port->write_fifo);
> + ret_serial.xmit_fifo_size = port->bulk_out_size;

These two are in not equivalent. bulk_out_size holds the urb buffer size
(which coincides with the endpoint size by default, but need to do so),
while the fifo size is the size of the write fifo, which is typically
always larger.

This field is supposed to reflect the hardware fifo size, and we don't
really use it consistently for usb-serial drivers. I'd just leave it as
is for now.

Thanks,
Johan

\
 
 \ /
  Last update: 2016-07-15 13:41    [W:0.222 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site