Re: [PATCH 16/36] usb: serial: ti_usb_3410_5052: Use bulk_out_size in TIOCGSERIAL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  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
--
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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux