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

NAME

6       usb_poison_urb - reliably kill a transfer and prevent further use of an
7       URB
8

SYNOPSIS

10       void usb_poison_urb(struct urb * urb);
11

ARGUMENTS

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

DESCRIPTION

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