diff options
author | Thomas Pugliese <thomas.pugliese@gmail.com> | 2013-12-10 00:15:15 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-10 01:29:21 +0400 |
commit | 756a2eed67e61e9596c2b49a787441c2e0daf1e1 (patch) | |
tree | 559053ae55ed079ba7f5875153e2c66af5e88001 | |
parent | ea1af42d3d4da73c9d75984f24e569515261b3fd (diff) | |
download | linux-756a2eed67e61e9596c2b49a787441c2e0daf1e1.tar.xz |
usb: wusbcore: set packet count correctly on isoc transfers
This patch correctly sets the dwNumOfPackets field of the HWA transfer
request for isochronous transfers with multiple segments. Previously
all segments used the value that was set for the first segment which may
not be correct.
Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/wusbcore/wa-xfer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c index 6aeb52cdc3fb..a70e142da330 100644 --- a/drivers/usb/wusbcore/wa-xfer.c +++ b/drivers/usb/wusbcore/wa-xfer.c @@ -1259,8 +1259,11 @@ static int __wa_xfer_setup(struct wa_xfer *xfer, struct urb *urb) for (cnt = 1; cnt < xfer->segs; cnt++) { struct wa_xfer_packet_info_hwaiso *packet_desc; struct wa_seg *seg = xfer->seg[cnt]; + struct wa_xfer_hwaiso *xfer_iso; xfer_hdr = &seg->xfer_hdr; + xfer_iso = container_of(xfer_hdr, + struct wa_xfer_hwaiso, hdr); packet_desc = ((void *)xfer_hdr) + xfer_hdr_size; /* * Copy values from the 0th header. Segment specific @@ -1270,6 +1273,8 @@ static int __wa_xfer_setup(struct wa_xfer *xfer, struct urb *urb) xfer_hdr->bTransferSegment = cnt; xfer_hdr->dwTransferLength = cpu_to_le32(seg->isoc_size); + xfer_iso->dwNumOfPackets = + cpu_to_le32(seg->isoc_frame_count); __wa_setup_isoc_packet_descr(packet_desc, xfer, seg); seg->status = WA_SEG_READY; } |