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