diff options
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index eb863b3f2d79..10bc1bf23b35 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -1610,24 +1610,11 @@ static void ftdi_process_read (void *param) | |||
1610 | length = 0; | 1610 | length = 0; |
1611 | } | 1611 | } |
1612 | 1612 | ||
1613 | /* have to make sure we don't overflow the buffer | ||
1614 | with tty_insert_flip_char's */ | ||
1615 | if (tty->flip.count+length > TTY_FLIPBUF_SIZE) { | ||
1616 | tty_flip_buffer_push(tty); | ||
1617 | need_flip = 0; | ||
1618 | |||
1619 | if (tty->flip.count != 0) { | ||
1620 | /* flip didn't work, this happens when ftdi_process_read() is | ||
1621 | * called from ftdi_unthrottle, because TTY_DONT_FLIP is set */ | ||
1622 | dbg("%s - flip buffer push failed", __FUNCTION__); | ||
1623 | break; | ||
1624 | } | ||
1625 | } | ||
1626 | if (priv->rx_flags & THROTTLED) { | 1613 | if (priv->rx_flags & THROTTLED) { |
1627 | dbg("%s - throttled", __FUNCTION__); | 1614 | dbg("%s - throttled", __FUNCTION__); |
1628 | break; | 1615 | break; |
1629 | } | 1616 | } |
1630 | if (tty->ldisc.receive_room(tty)-tty->flip.count < length) { | 1617 | if (tty_buffer_request_room(tty, length) < length) { |
1631 | /* break out & wait for throttling/unthrottling to happen */ | 1618 | /* break out & wait for throttling/unthrottling to happen */ |
1632 | dbg("%s - receive room low", __FUNCTION__); | 1619 | dbg("%s - receive room low", __FUNCTION__); |
1633 | break; | 1620 | break; |