pub enum CompletionCode {
Show 36 variants
Invalid,
Success,
DataBufferError,
BabbleDetectedError,
UsbTransactionError,
TrbError,
StallError,
ResourceError,
BandwidthError,
NoSlotsAvailableError,
InvalidStreamTypeError,
SlotNotEnabledError,
EndpointNotEnabledError,
ShortPacket,
RingUnderrun,
RingOverrun,
VfEventRingFullError,
ParameterError,
BandwidthOverrunError,
ContextStateError,
NoPingResponseError,
EventRingFullError,
IncompatibleDeviceError,
MissedServiceError,
CommandRingStopped,
CommandAborted,
Stopped,
StoppedLengthInvalid,
StoppedShortPacket,
MaxExitLatencyTooLargeError,
IsochBufferOverrun,
EventLostError,
UndefinedError,
InvalidStreamIdError,
SecondaryBandwidthError,
SplitTransactionError,
}
Expand description
The TRB Completion Codes.
The description of each error is quoted from eXtensible Host Controller Interface for Universal Serial Bus (xHCI) Requirements Specification May 2019 Revision 1.2, Section 6.4.5, Table 6-90. Refer to this specification for more detail.
Variants§
Invalid
Indicates that the Completion Code field has not been updated by the TRB producer.
Success
Indicates successful completion of the TRB operation.
DataBufferError
Indicates that the Host Controller is unable to keep up the reception of incoming data (overrun) or is unable to supply data fast enough during transmission (underrun).
BabbleDetectedError
Asserted when “babbling” is detected during the transaction generated by this TRB.
UsbTransactionError
Asserted in the case where the host did not receive a valid response from the device.
TrbError
Asserted when a TRB parameter error condition is detected in a TRB.
StallError
Asserted when a Stall condition is detected for a TRB.
ResourceError
Asserted by a Configure Endpoint Command or an Address Device Command if there are not adequate xHC resources available to successfully complete the command.
BandwidthError
Asserted by a Configure Endpoint Command if periodic endpoints are declared and the xHC is not able to allocate the required Bandwidth.
NoSlotsAvailableError
Asserted if a adding one more device would result in the host controller to exceed the maximum Number of Device Slots for this implementation.
InvalidStreamTypeError
Asserted if an invalid Stream Context Type value is detected.
SlotNotEnabledError
Asserted if a command is issued to a Device Slot that is in the Disabled state.
EndpointNotEnabledError
Asserted if a doorbell is rung for an endpoint that is in the Disabled state.
ShortPacket
Asserted if the number of bytes received was less than the TD Transfer Size.
RingUnderrun
Asserted in a Transfer Event TRB if the Transfer Ring is empty when an enabled Isoch endpoint is scheduled to transmit data.
RingOverrun
Asserted in a Transfer Event TRB if the Transfer Ring is empty when an enabled Isoch endpoint is scheduled to receive data.
VfEventRingFullError
Asserted by a Force Event command if the target VF’s Event Ring is full.
ParameterError
Asserted by a command if a Context parameter is invalid.
BandwidthOverrunError
Asserted during an Isoch transfer if the TD exceeds the bandwidth allocated to the endpoint.
ContextStateError
Asserted if a command is issued to transition from an illegal context state.
NoPingResponseError
Asserted if the xHC was unable to complete a periodic data transfer associated within the ESIT, because it did not receive a PING_RESPONSE in time.
EventRingFullError
Asserted if the Event Ring is full, the xHC is unable to post an Event to the ring.
IncompatibleDeviceError
Asserted if the xHC detects a problem with a device that does not allow it to be successfully accessed.
MissedServiceError
Asserted if the xHC was unable to service a Isochronous endpoint within the Interval time.
CommandRingStopped
Asserted in a Command Completion Event due to a Command Stop operation.
CommandAborted
Asserted in a Command Completion Event of an aborted command if the command was terminated by a Command Abort (CA) operation.
Stopped
Asserted in a Transfer Event if the transfer was terminated by a Stop Endpoint Command.
StoppedLengthInvalid
Asserted in a Transfer Event if the transfer was terminated by a Stop Endpoint Command and the Transfer Event TRB Transfer Length field is invalid.
StoppedShortPacket
Asserted in a Transfer Event if the transfer was terminated by a Stop Endpoint Command, and the transfer was stopped after Short Packet conditions were met, but before the end of the TD was reached.
MaxExitLatencyTooLargeError
Asserted by the Evaluate Context Command if the proposed Max Exit Latency would not allow the periodic endpoints of the Device Slot to be scheduled.
IsochBufferOverrun
Asserted if the data buffer defined by an Isoch TD on an IN endpoint is less than the Max ESIT Payload in size and the device attempts to send more data than it can hold.
EventLostError
Asserted if the xHC internal event overrun condition.
UndefinedError
May be reported by an event when other error codes do not apply.
InvalidStreamIdError
Asserted if an invalid Stream ID is received.
SecondaryBandwidthError
Asserted by a Configure Endpoint Command if periodic endpoints are declared and the xHC is not able to allocate the required Bandwidth due to a Secondary Bandwidth Domain.
SplitTransactionError
Asserted if an error is detected on a USB2 protocol endpoint for a split transaction.
Trait Implementations§
source§impl Clone for CompletionCode
impl Clone for CompletionCode
source§fn clone(&self) -> CompletionCode
fn clone(&self) -> CompletionCode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CompletionCode
impl Debug for CompletionCode
source§impl FromPrimitive for CompletionCode
impl FromPrimitive for CompletionCode
source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moresource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moresource§impl Hash for CompletionCode
impl Hash for CompletionCode
source§impl Ord for CompletionCode
impl Ord for CompletionCode
source§fn cmp(&self, other: &CompletionCode) -> Ordering
fn cmp(&self, other: &CompletionCode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<CompletionCode> for CompletionCode
impl PartialEq<CompletionCode> for CompletionCode
source§fn eq(&self, other: &CompletionCode) -> bool
fn eq(&self, other: &CompletionCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<CompletionCode> for CompletionCode
impl PartialOrd<CompletionCode> for CompletionCode
source§fn partial_cmp(&self, other: &CompletionCode) -> Option<Ordering>
fn partial_cmp(&self, other: &CompletionCode) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more