diff options
author | Thomas Pugliese <thomas.pugliese@gmail.com> | 2014-02-28 15:10:26 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-28 16:14:48 -0800 |
commit | ecf3701cede840476b012ac4796f77c6dd9ee623 (patch) | |
tree | 3cafd7a63113333cb6d24c31e0b18405fe0bb9ee /drivers/usb/wusbcore | |
parent | 4659a2452baa7d89324fda097158d7f8fe71e0cb (diff) | |
download | talos-obmc-linux-ecf3701cede840476b012ac4796f77c6dd9ee623.tar.gz talos-obmc-linux-ecf3701cede840476b012ac4796f77c6dd9ee623.zip |
usb: wusbcore: read actual_length bytes isoc in segments
Use the iso_frame_desc.actual_length field instead of length when
reading isoc in data segments from the HWA. This fixes a case where the
isoc in read URB would never complete because it expected the HWA to
send more data than it actually did. When this happened the URB would
be stuck in the driver preventing module unload and clean shutdown.
Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/wusbcore')
-rw-r--r-- | drivers/usb/wusbcore/wa-xfer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c index 3d6b30d8520e..ff1de5e396a4 100644 --- a/drivers/usb/wusbcore/wa-xfer.c +++ b/drivers/usb/wusbcore/wa-xfer.c @@ -2159,7 +2159,7 @@ static void __wa_populate_buf_in_urb_isoc(struct wahc *wa, struct wa_xfer *xfer, wa->buf_in_urb->transfer_dma = xfer->urb->transfer_dma + xfer->urb->iso_frame_desc[curr_iso_frame].offset; wa->buf_in_urb->transfer_buffer_length = - xfer->urb->iso_frame_desc[curr_iso_frame].length; + xfer->urb->iso_frame_desc[curr_iso_frame].actual_length; wa->buf_in_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; wa->buf_in_urb->transfer_buffer = NULL; wa->buf_in_urb->sg = NULL; |