Commit 238ebd13 authored by Elina Pasheva's avatar Elina Pasheva Committed by Greg Kroah-Hartman

USB: serial: sierra driver zero length packet fix

- Fixed a problem with transferring packets with size a multiple of Bulk
  Xfer size in function sierra_write(). Added transfer flag
  URB_ZERO_PACKET before submitting the urb to trigger Zero-length data
  transfer when packet size is a multiple of Bulk Xfer.
Signed-off-by: default avatarElina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 72fda3ca
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org> Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org>
*/ */
#define DRIVER_VERSION "v.1.3.6" #define DRIVER_VERSION "v.1.3.7"
#define DRIVER_AUTHOR "Kevin Lloyd, Elina Pasheva, Matthew Safar, Rory Filer" #define DRIVER_AUTHOR "Kevin Lloyd, Elina Pasheva, Matthew Safar, Rory Filer"
#define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems"
...@@ -474,6 +474,9 @@ static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port, ...@@ -474,6 +474,9 @@ static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port,
port->bulk_out_endpointAddress), port->bulk_out_endpointAddress),
buffer, writesize, sierra_outdat_callback, port); buffer, writesize, sierra_outdat_callback, port);
/* Handle the need to send a zero length packet */
urb->transfer_flags |= URB_ZERO_PACKET;
/* send it down the pipe */ /* send it down the pipe */
retval = usb_submit_urb(urb, GFP_ATOMIC); retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval) { if (retval) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment