1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
|
'\" 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 "5 Jan 2004" "SunOS 5.11" "Data Structures for Drivers"
.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
.mk
.na
\fBUSB_CR_OK\fR
.ad
.RS 27n
.rt
The transfer completed without any errors being detected.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_CRC\fR
.ad
.RS 27n
.rt
CRC error was detected.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_BITSTUFFING\fR
.ad
.RS 27n
.rt
Bit stuffing violation was detected.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_DATA_TOGGLE_MM\fR
.ad
.RS 27n
.rt
Data toggle packet identifier did not match expected value.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_STALL\fR
.ad
.RS 27n
.rt
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
.mk
.na
\fBUSB_CR_DEV_NOT_RESP\fR
.ad
.RS 27n
.rt
Host controller timed out while waiting for device to respond.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_PID_CHECKFAILURE\fR
.ad
.RS 27n
.rt
Check bits on the packet identifier returned from the device were
not as expected.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_UNEXP_PID\fR
.ad
.RS 27n
.rt
Packet identifier received was not valid.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_DATA_OVERRUN\fR
.ad
.RS 27n
.rt
Amount of data returned exceeded either the maximum packet size of the endpoint
or the remaining buffer size.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_DATA_UNDERRUN\fR
.ad
.RS 27n
.rt
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
.mk
.na
\fBUSB_CR_BUFFER_OVERRUN\fR
.ad
.RS 27n
.rt
A device sent data faster than the system could digest it.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_BUFFER_UNDERRUN\fR
.ad
.RS 27n
.rt
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
.mk
.na
\fBUSB_CR_TIMEOUT\fR
.ad
.RS 27n
.rt
A timeout specified in a control, bulk, or one-time interrupt request has
expired.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_NOT_ACCESSED\fR
.ad
.RS 27n
.rt
Request was not accessed nor processed by the host controller.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_NO_RESOURCES\fR
.ad
.RS 27n
.rt
No resources were available to continue servicing a periodic interrupt or
isochronous request.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_STOPPED_POLLING\fR
.ad
.RS 27n
.rt
Servicing of the current periodic request cannot continue because polling on an
interrupt-IN or isochronous-IN endpoint has stopped.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_PIPE_CLOSING\fR
.ad
.RS 27n
.rt
Request was not started because the pipe to which it was queued was closing or
closed.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_PIPE_RESET\fR
.ad
.RS 27n
.rt
Request was not started because the pipe to which it was queued was reset.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_NOT_SUPPORTED\fR
.ad
.RS 27n
.rt
Request or command is not supported.
.RE
.sp
.ne 2
.mk
.na
\fBUSB_CR_FLUSHED\fR
.ad
.RS 27n
.rt
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
.mk
.na
\fBUSB_CR_HC_HARDWARE_ERR\fR
.ad
.RS 27n
.rt
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
tab() box;
cw(2.75i) |cw(2.75i)
lw(2.75i) |lw(2.75i)
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
ArchitecturePCI-based systems
_
Interface stabilityCommitted
.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).
|