- if (urb->transfer_flags & URB_ASYNC_UNLINK) {
- /* asynchronous with callback */
- /* relink the urb to the del list */
- list_move (&urb->urb_list, &hci->del_list);
- spin_unlock_irqrestore (&usb_urb_lock, flags);
- } else {
- /* synchronous without callback */
-
- add_wait_queue (&hci->waitq, &wait);
-
- set_current_state (TASK_UNINTERRUPTIBLE);
- comp = urb->complete;
- urb->complete = NULL;
-
- /* relink the urb to the del list */
- list_move(&urb->urb_list, &hci->del_list);
-
- spin_unlock_irqrestore (&usb_urb_lock, flags);
-
- schedule_timeout (HZ / 50);
-
- if (!list_empty (&urb->urb_list))
- list_del (&urb->urb_list);
-
- urb->complete = comp;
- urb->hcpriv = NULL;
- remove_wait_queue (&hci->waitq, &wait);
- }
+ /* asynchronous with callback */
+ /* relink the urb to the del list */
+ list_move (&urb->urb_list, &hci->del_list);
+ urb->status = status;
+ spin_unlock_irqrestore (&usb_urb_lock, flags);