Struct Xhci

Source
pub struct Xhci {
    fail_handle: Arc<dyn FailHandle>,
    regs: XhciRegs,
    interrupter: Arc<Mutex<Interrupter>>,
    command_ring_controller: Arc<RingBufferController<CommandRingTrbHandler>>,
    device_slots: DeviceSlots,
    event_loop: Arc<EventLoop>,
    event_loop_join_handle: Option<JoinHandle<()>>,
    intr_resample_handler: Arc<IntrResampleHandler>,
    device_provider: Box<dyn XhciBackendDeviceProvider>,
}
Expand description

xHCI controller implementation.

Fields§

§fail_handle: Arc<dyn FailHandle>§regs: XhciRegs§interrupter: Arc<Mutex<Interrupter>>§command_ring_controller: Arc<RingBufferController<CommandRingTrbHandler>>§device_slots: DeviceSlots§event_loop: Arc<EventLoop>§event_loop_join_handle: Option<JoinHandle<()>>§intr_resample_handler: Arc<IntrResampleHandler>§device_provider: Box<dyn XhciBackendDeviceProvider>

Implementations§

Source§

impl Xhci

Source

pub fn new( fail_handle: Arc<dyn FailHandle>, mem: GuestMemory, device_provider: Box<dyn XhciBackendDeviceProvider>, interrupt_evt: IrqLevelEvent, regs: XhciRegs, ) -> Result<Arc<Self>, Error>

Create a new xHCI controller.

Source

fn init_reg_callbacks(xhci: &Arc<Xhci>)

Source

fn handle_register_callback_result<T>(&self, r: Result<T, Error>, t: T) -> T

Source

fn usbcmd_callback(&self, value: u32) -> Result<u32, Error>

Source

fn crcr_callback(&self, value: u64) -> u64

Source

fn portsc_callback(&self, index: u32, value: u32) -> Result<u32, Error>

Source

fn doorbell_callback(&self, index: u32, value: u32) -> Result<(), Error>

Source

fn iman_callback(&self, value: u32) -> Result<(), Error>

Source

fn imod_callback(&self, value: u32) -> Result<(), Error>

Source

fn erstsz_callback(&self, value: u32) -> Result<(), Error>

Source

fn erstba_callback(&self, value: u64) -> Result<(), Error>

Source

fn erdp_callback(&self, value: u64) -> Result<(), Error>

Source

fn reset(&self)

Source

fn halt(&self)

Trait Implementations§

Source§

impl Drop for Xhci

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Xhci

§

impl !RefUnwindSafe for Xhci

§

impl Send for Xhci

§

impl Sync for Xhci

§

impl Unpin for Xhci

§

impl !UnwindSafe for Xhci

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V