Skip to content

Commit

Permalink
vdp: correctly handle status_unprocessed
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheph committed Jan 13, 2017
1 parent 0584639 commit e120eee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/vdphci/vdphci_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,15 @@ static int vdphci_device_process_urb_devent(struct vdphci_device* device, const
goto out;
}

if (urb_devent.status == vdphci_urb_status_unprocessed) {
urb_khevent->urb->status = -ENOMEM;
retval = 0;

vdphci_port_khevent_urb_remove(device->port, urb_khevent, &giveback_list);

goto out;
}

if (usb_pipein(urb_khevent->urb->pipe)) {
switch (usb_pipetype(urb_khevent->urb->pipe)) {
case PIPE_CONTROL:
Expand Down
2 changes: 2 additions & 0 deletions vdpusb/vdp_usb_urbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,8 @@ vdp_usb_result vdp_usb_urbi_update(struct vdp_usb_urbi* urbi)

actual_length += urbi->urb.iso_packets[i].actual_length;
}

urbi->devent_urb.status = vdphci_urb_status_completed;
} else {
actual_length = urbi->urb.actual_length;

Expand Down

0 comments on commit e120eee

Please sign in to comment.