Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thomas Pugliese and committed by
Greg Kroah-Hartman
756a2eed ea1af42d

+5
+5
drivers/usb/wusbcore/wa-xfer.c
··· 1259 1259 for (cnt = 1; cnt < xfer->segs; cnt++) { 1260 1260 struct wa_xfer_packet_info_hwaiso *packet_desc; 1261 1261 struct wa_seg *seg = xfer->seg[cnt]; 1262 + struct wa_xfer_hwaiso *xfer_iso; 1262 1263 1263 1264 xfer_hdr = &seg->xfer_hdr; 1265 + xfer_iso = container_of(xfer_hdr, 1266 + struct wa_xfer_hwaiso, hdr); 1264 1267 packet_desc = ((void *)xfer_hdr) + xfer_hdr_size; 1265 1268 /* 1266 1269 * Copy values from the 0th header. Segment specific ··· 1273 1270 xfer_hdr->bTransferSegment = cnt; 1274 1271 xfer_hdr->dwTransferLength = 1275 1272 cpu_to_le32(seg->isoc_size); 1273 + xfer_iso->dwNumOfPackets = 1274 + cpu_to_le32(seg->isoc_frame_count); 1276 1275 __wa_setup_isoc_packet_descr(packet_desc, xfer, seg); 1277 1276 seg->status = WA_SEG_READY; 1278 1277 }