USB isochronous urb consists of some isoc frames, urb use iso_frame_desc
structure record actual_length, then device drivers always use this and
don't care urb actual_length. But in usb devio driver, processcompl()
function will process urb complete and copy data to user depend on urb
actual_length.
In dwc controller driver, update_isoc_urb_state() function will only
update isoc frames actual_length, urb actual_length will be 0. When use
usb devio driver, there is no data copy to user, so need update urb
actual_length at the same time.
TEST=use libusb to transport isochronous data
Change-Id: I1dc8e8d8c6609924626761525b98f41a739aeb65
Signed-off-by: Feng Mingli <fml@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
frame_desc->status = 0;
frame_desc->actual_length =
get_actual_xfer_length(hc, hc_regs, qtd, halt_status, NULL);
+ urb->actual_length += frame_desc->actual_length;
/* non DWORD-aligned buffer case handling. */
if (hc->align_buff && frame_desc->actual_length && hc->ep_is_in) {
frame_desc->status = -DWC_E_PROTOCOL;
frame_desc->actual_length =
get_actual_xfer_length(hc, hc_regs, qtd, halt_status, NULL);
+ urb->actual_length += frame_desc->actual_length;
/* non DWORD-aligned buffer case handling. */
if (hc->align_buff && frame_desc->actual_length && hc->ep_is_in) {