'\" te .\" Copyright (c) 2004, Sun Microsystems, Inc., All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH USB_COMPLETION_REASON 9S "Jan 5, 2004" .SH NAME usb_completion_reason \- USB completion reason definitions .SH SYNOPSIS .LP .nf #include <sys/usb/usba.h> .fi .SH INTERFACE LEVEL .sp .LP Solaris DDI specific (Solaris DDI) .SH DESCRIPTION .sp .LP If an error occurs during execution of a USB request, the USBA framework calls a client driver's exception callback handler to relay what happened. The host controller reports transport errors to the exception callback handler through the handler's request argument's completion reason (usb_cr_t) field. A completion reason of USB_CR_OK means the transfer completed with no errors detected. .sp .LP The usb_cr_t enumerated type contains the following definitions: .sp .ne 2 .na \fBUSB_CR_OK\fR .ad .RS 27n The transfer completed without any errors being detected. .RE .sp .ne 2 .na \fBUSB_CR_CRC\fR .ad .RS 27n CRC error was detected. .RE .sp .ne 2 .na \fBUSB_CR_BITSTUFFING\fR .ad .RS 27n Bit stuffing violation was detected. .RE .sp .ne 2 .na \fBUSB_CR_DATA_TOGGLE_MM\fR .ad .RS 27n Data toggle packet identifier did not match expected value. .RE .sp .ne 2 .na \fBUSB_CR_STALL\fR .ad .RS 27n The device endpoint indicated that it is stalled. If autoclearing is enabled for the request (request attributes has USB_ATTRS_AUTOCLEARING set), check the callback flags (usb_cb_flags_t) in the callback handler to determine whether the stall is a functional stall (USB_CB_FUNCTIONAL_STALL) or a protocol stall (USB_CB_PROTOCOL_STALL). Please see \fBusb_request_attributes\fR(9S) for more information on autoclearing. .RE .sp .ne 2 .na \fBUSB_CR_DEV_NOT_RESP\fR .ad .RS 27n Host controller timed out while waiting for device to respond. .RE .sp .ne 2 .na \fBUSB_CR_PID_CHECKFAILURE\fR .ad .RS 27n Check bits on the packet identifier returned from the device were not as expected. .RE .sp .ne 2 .na \fBUSB_CR_UNEXP_PID\fR .ad .RS 27n Packet identifier received was not valid. .RE .sp .ne 2 .na \fBUSB_CR_DATA_OVERRUN\fR .ad .RS 27n Amount of data returned exceeded either the maximum packet size of the endpoint or the remaining buffer size. .RE .sp .ne 2 .na \fBUSB_CR_DATA_UNDERRUN\fR .ad .RS 27n Amount of data returned was not sufficient to fill the specified buffer and the USB_ATTRS_SHORT_XFER_OK attribute was not set. Please see \fBusb_request_attributes\fR(9S) for more information on allowance of short transfers. .RE .sp .ne 2 .na \fBUSB_CR_BUFFER_OVERRUN\fR .ad .RS 27n A device sent data faster than the system could digest it. .RE .sp .ne 2 .na \fBUSB_CR_BUFFER_UNDERRUN\fR .ad .RS 27n The host controller could not get data from the system fast enough to keep up with the required USB data rate. .RE .sp .ne 2 .na \fBUSB_CR_TIMEOUT\fR .ad .RS 27n A timeout specified in a control, bulk, or one-time interrupt request has expired. .RE .sp .ne 2 .na \fBUSB_CR_NOT_ACCESSED\fR .ad .RS 27n Request was not accessed nor processed by the host controller. .RE .sp .ne 2 .na \fBUSB_CR_NO_RESOURCES\fR .ad .RS 27n No resources were available to continue servicing a periodic interrupt or isochronous request. .RE .sp .ne 2 .na \fBUSB_CR_STOPPED_POLLING\fR .ad .RS 27n Servicing of the current periodic request cannot continue because polling on an interrupt-IN or isochronous-IN endpoint has stopped. .RE .sp .ne 2 .na \fBUSB_CR_PIPE_CLOSING\fR .ad .RS 27n Request was not started because the pipe to which it was queued was closing or closed. .RE .sp .ne 2 .na \fBUSB_CR_PIPE_RESET\fR .ad .RS 27n Request was not started because the pipe to which it was queued was reset. .RE .sp .ne 2 .na \fBUSB_CR_NOT_SUPPORTED\fR .ad .RS 27n Request or command is not supported. .RE .sp .ne 2 .na \fBUSB_CR_FLUSHED\fR .ad .RS 27n Request was not completed because the pipe to which it was queued went to an error state, became stalled, was reset or was closed. .RE .sp .ne 2 .na \fBUSB_CR_HC_HARDWARE_ERR\fR .ad .RS 27n Request could not be completed due to a general host controller hardware error. .RE .SH ATTRIBUTES .sp .LP See attributes(5) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Architecture PCI-based systems _ Interface stability Committed .TE .SH SEE ALSO .sp .LP \fBusb_alloc_request\fR(9F), \fBusb_pipe_bulk_xfer\fR(9F), \fBusb_pipe_ctrl_xfer\fR(9F), \fBusb_pipe_intr_xfer\fR(9F), \fBusb_pipe_isoc_xfer\fR(9F), \fBusb_bulk_request\fR(9S), \fBusb_ctrl_request\fR(9S), \fBusb_intr_request\fR(9S), \fBusb_isoc_request\fR(9S).