diff options
author | Johan Hovold <jhovold@gmail.com> | 2010-05-18 18:01:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 16:21:50 -0400 |
commit | c1aa075acb696c374613fded0380c7ad8a96ebf5 (patch) | |
tree | cbdd204f095b3dcf25c331e8e29304a8f712b578 /drivers/usb | |
parent | 60b3013cdaf3fa8a17243ca46b19db3cbe08d943 (diff) |
USB: ftdi_sio: fix legacy SIO-device header
Length field of header was incorrectly set to available payload space
rather than the actual payload size.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 97f2d9c1edd6..050211afc07e 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -1752,10 +1752,10 @@ static int ftdi_prepare_write_buffer(struct usb_serial_port *port, | |||
1752 | spin_lock_irqsave(&port->lock, flags); | 1752 | spin_lock_irqsave(&port->lock, flags); |
1753 | for (i = 0; i < size - 1; i += priv->max_packet_size) { | 1753 | for (i = 0; i < size - 1; i += priv->max_packet_size) { |
1754 | len = min_t(int, size - i, priv->max_packet_size) - 1; | 1754 | len = min_t(int, size - i, priv->max_packet_size) - 1; |
1755 | buffer[i] = (len << 2) + 1; | ||
1756 | c = kfifo_out(&port->write_fifo, &buffer[i + 1], len); | 1755 | c = kfifo_out(&port->write_fifo, &buffer[i + 1], len); |
1757 | if (!c) | 1756 | if (!c) |
1758 | break; | 1757 | break; |
1758 | buffer[i] = (c << 2) + 1; | ||
1759 | count += c + 1; | 1759 | count += c + 1; |
1760 | } | 1760 | } |
1761 | spin_unlock_irqrestore(&port->lock, flags); | 1761 | spin_unlock_irqrestore(&port->lock, flags); |