|
@@ -1820,6 +1820,18 @@ static int proc_unlinkurb(struct usb_dev_state *ps, void __user *arg)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static void compute_isochronous_actual_length(struct urb *urb)
|
|
|
+{
|
|
|
+ unsigned int i;
|
|
|
+
|
|
|
+ if (urb->number_of_packets > 0) {
|
|
|
+ urb->actual_length = 0;
|
|
|
+ for (i = 0; i < urb->number_of_packets; i++)
|
|
|
+ urb->actual_length +=
|
|
|
+ urb->iso_frame_desc[i].actual_length;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
static int processcompl(struct async *as, void __user * __user *arg)
|
|
|
{
|
|
|
struct urb *urb = as->urb;
|
|
@@ -1827,6 +1839,7 @@ static int processcompl(struct async *as, void __user * __user *arg)
|
|
|
void __user *addr = as->userurb;
|
|
|
unsigned int i;
|
|
|
|
|
|
+ compute_isochronous_actual_length(urb);
|
|
|
if (as->userbuffer && urb->actual_length) {
|
|
|
if (copy_urb_data_to_user(as->userbuffer, urb))
|
|
|
goto err_out;
|
|
@@ -1995,6 +2008,7 @@ static int processcompl_compat(struct async *as, void __user * __user *arg)
|
|
|
void __user *addr = as->userurb;
|
|
|
unsigned int i;
|
|
|
|
|
|
+ compute_isochronous_actual_length(urb);
|
|
|
if (as->userbuffer && urb->actual_length) {
|
|
|
if (copy_urb_data_to_user(as->userbuffer, urb))
|
|
|
return -EFAULT;
|