1USB_KILL_URB(9)                  USB Core APIs                 USB_KILL_URB(9)
2
3
4

NAME

6       usb_kill_urb - cancel a transfer request and wait for it to finish
7

SYNOPSIS

9       void usb_kill_urb(struct urb * urb);
10

ARGUMENTS

12       urb
13           pointer to URB describing a previously submitted request, may be
14           NULL
15

DESCRIPTION

17       This routine cancels an in-progress request. It is guaranteed that upon
18       return all completion handlers will have finished and the URB will be
19       totally idle and available for reuse. These features make this an ideal
20       way to stop I/O in a disconnect callback or close function. If the
21       request has not already finished or been unlinked the completion
22       handler will see urb->status == -ENOENT.
23
24       While the routine is running, attempts to resubmit the URB will fail
25       with error -EPERM. Thus even if the URB's completion handler always
26       tries to resubmit, it will not succeed and the URB will become idle.
27
28       The URB must not be deallocated while this routine is running. In
29       particular, when a driver calls this routine, it must insure that the
30       completion handler cannot deallocate the URB.
31
32       This routine may not be used in an interrupt context (such as a bottom
33       half or a completion handler), or when holding a spinlock, or in other
34       situations where the caller can't schedule.
35
36       This routine should not be called by a driver after its disconnect
37       method has returned.
38
40Kernel Hackers Manual 3.10         June 2019                   USB_KILL_URB(9)
Impressum