xref: /netbsd-src/share/man/man9/usbd_status.9 (revision d914a3c1b942947a8b1fa87645678df29ac8e6ab)
1.\"	$NetBSD: usbd_status.9,v 1.3 2021/12/11 19:24:19 mrg Exp $
2.\"
3.\" Copyright (c) 2012 Matthew R. Green
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.Dd May 12, 2012
28.Dt USBD_STATUS 9
29.Os
30.Sh NAME
31.Nm usbd_status
32.Nd USB device drivers interface return status values
33.Sh SYNOPSIS
34.In dev/usb/usbdi.h
35.Sh DESCRIPTION
36This documents the full list of return values used by the generic USB code.
37Interface-specific definitions will be given with interface.
38.Sh RETURN VALUES
39Return values are split into two main groups: expected values
40and error values.
41.Pp
42There are only two expected values:
43.Bl -tag -width indent
44.It Dv USBD_NORMAL_COMPLETION
45The operation completed successfully.
46.It Dv USBD_IN_PROGRESS
47The operation was successfully submitted, usually part of
48an asynchronous operation.
49.El
50.Pp
51These are the error values:
52.Bl -tag -width indent
53.It Dv USBD_PENDING_REQUESTS
54The requested operation could not be completed due to pending
55requests, usually from a pipe close operation.
56.It Dv USBD_NOT_STARTED
57The initial status of a USB transfer.
58See
59.Xr usbdi 9
60for more details about USB transfers.
61.It Dv USBD_INVAL
62Invalid arguments were supplied for the requested operation.
63.It Dv USBD_NOMEM
64No memory could be allocated.
65.It Dv USBD_CANCELLED
66The USB transfer has been cancelled, and not completed.
67.It Dv USBD_BAD_ADDRESS
68The requested USB pipe could not be found.
69See
70.Xr usbdi 9
71for more details about USB pipes.
72.It Dv USBD_IN_USE
73The requested operation could not be performed due to the device
74having active connections, such as USB audio device currently playing.
75.It Dv USBD_NO_ADDR
76USB bus has reached its maximum limit of devices.
77.It Dv USBD_SET_ADDR_FAILED
78Call to
79.Fn usbd_set_address
80failed during new USB device discovery.
81.It Dv USBD_NO_POWER
82New device has requested more power than is available.
83.It Dv USBD_TOO_DEEP
84.\" XXXMRG why do we do this?  it's only 5 right now.
85New USB Hub too deep from the root.
86.It Dv USBD_IOERROR
87Non-specific error happened during IO.
88.It Dv USBD_NOT_CONFIGURED
89USB device is not configured; it has no configuration descriptor.
90.It Dv USBD_TIMEOUT
91Operation timed out.
92.It Dv USBD_SHORT_XFER
93USB transfer succeeded but not all requested data was returned.
94.It Dv USBD_STALLED
95USB controller has stalled (controller specific.)
96.It Dv USBD_INTERRUPTED
97Process was interrupted by external means (such as a signal) while
98waiting for a transfer to complete.
99.El
100.Sh SEE ALSO
101.Xr usb 4 ,
102.Xr usbdi 9
103.Sh HISTORY
104This
105.Nm
106interface first appeared in
107.Nx 1.4 .
108