Re: [PATCH v2] USB: serial: cp210x: Add tx_empty()

2015-11-26 Thread Konstantin Shkolnyy
On Wed, Nov 25, 2015 at 2:26 PM, Andy Shevchenko wrote: > On Wed, Nov 25, 2015 at 12:28 AM, Konstantin Shkolnyy > wrote: >> +static bool cp210x_tx_empty(struct usb_serial_port *port) >> +{ >> + int err; >> + u32 count; >> + >> + err = cp210x_get_tx_queue_byte_count(port, ); >

Re: [PATCH v2] USB: serial: cp210x: Add tx_empty()

2015-11-26 Thread Konstantin Shkolnyy
On Wed, Nov 25, 2015 at 2:26 PM, Andy Shevchenko wrote: > On Wed, Nov 25, 2015 at 12:28 AM, Konstantin Shkolnyy > wrote: >> +static bool cp210x_tx_empty(struct usb_serial_port *port) >> +{ >> + int err; >> + u32 count; >> +

Re: [PATCH v2] USB: serial: cp210x: Add tx_empty()

2015-11-25 Thread Johan Hovold
On Thu, Nov 26, 2015 at 08:35:12AM +0100, Johan Hovold wrote: > On Wed, Nov 25, 2015 at 10:26:12PM +0200, Andy Shevchenko wrote: > > On Wed, Nov 25, 2015 at 12:28 AM, Konstantin Shkolnyy > > wrote: > > > Added tx_empty callback needed for generic wait-until-sent support. > > > Without this

Re: [PATCH v2] USB: serial: cp210x: Add tx_empty()

2015-11-25 Thread Johan Hovold
On Wed, Nov 25, 2015 at 10:26:12PM +0200, Andy Shevchenko wrote: > On Wed, Nov 25, 2015 at 12:28 AM, Konstantin Shkolnyy > wrote: > > Added tx_empty callback needed for generic wait-until-sent support. > > Without this function, when the port is closed usbserial can't know that > > there are

Re: [PATCH v2] USB: serial: cp210x: Add tx_empty()

2015-11-25 Thread Andy Shevchenko
On Wed, Nov 25, 2015 at 12:28 AM, Konstantin Shkolnyy wrote: > Added tx_empty callback needed for generic wait-until-sent support. > Without this function, when the port is closed usbserial can't know that > there are still data in the chip's transmit FIFO. The chip gets disabled > and

Re: [PATCH v2] USB: serial: cp210x: Add tx_empty()

2015-11-25 Thread Andy Shevchenko
On Wed, Nov 25, 2015 at 12:28 AM, Konstantin Shkolnyy wrote: > Added tx_empty callback needed for generic wait-until-sent support. > Without this function, when the port is closed usbserial can't know that > there are still data in the chip's transmit FIFO. The chip

Re: [PATCH v2] USB: serial: cp210x: Add tx_empty()

2015-11-25 Thread Johan Hovold
On Thu, Nov 26, 2015 at 08:35:12AM +0100, Johan Hovold wrote: > On Wed, Nov 25, 2015 at 10:26:12PM +0200, Andy Shevchenko wrote: > > On Wed, Nov 25, 2015 at 12:28 AM, Konstantin Shkolnyy > > wrote: > > > Added tx_empty callback needed for generic wait-until-sent

Re: [PATCH v2] USB: serial: cp210x: Add tx_empty()

2015-11-25 Thread Johan Hovold
On Wed, Nov 25, 2015 at 10:26:12PM +0200, Andy Shevchenko wrote: > On Wed, Nov 25, 2015 at 12:28 AM, Konstantin Shkolnyy > wrote: > > Added tx_empty callback needed for generic wait-until-sent support. > > Without this function, when the port is closed usbserial

[PATCH v2] USB: serial: cp210x: Add tx_empty()

2015-11-24 Thread Konstantin Shkolnyy
Added tx_empty callback needed for generic wait-until-sent support. Without this function, when the port is closed usbserial can't know that there are still data in the chip's transmit FIFO. The chip gets disabled and untransmitted data lost. When the actual byte count is reported by tx-empty the

[PATCH v2] USB: serial: cp210x: Add tx_empty()

2015-11-24 Thread Konstantin Shkolnyy
Added tx_empty callback needed for generic wait-until-sent support. Without this function, when the port is closed usbserial can't know that there are still data in the chip's transmit FIFO. The chip gets disabled and untransmitted data lost. When the actual byte count is reported by tx-empty the