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>
This commit is contained in:
parent
ea1af42d3d
commit
756a2eed67
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue