Compare commits

...

2 Commits

2 changed files with 10 additions and 3 deletions

View File

@ -236,7 +236,10 @@ impl Xhci {
let state = &self.port_states[port]; let state = &self.port_states[port];
match state.state.swap(PortState::Disconnected, Ordering::Release) { match state.state.swap(PortState::Disconnected, Ordering::Release) {
PortState::Init => todo!(), PortState::Init => {
log::warn!("USB device detach received while in init state");
Ok(())
}
PortState::Running => { PortState::Running => {
log::info!("Port {}: device detached", port); log::info!("Port {}: device detached", port);
let address = state let address = state

View File

@ -123,8 +123,12 @@ impl InterruptHandler for HpetTimer {
impl Device for HpetTimer { impl Device for HpetTimer {
unsafe fn init(self: Arc<Self>) -> Result<(), Error> { unsafe fn init(self: Arc<Self>) -> Result<(), Error> {
// TODO support arbitrary configurations if self.period > u32::MAX as u64 && !self.bits64 {
assert!(self.bits64); log::error!(
"HPET period is >32bit and the HPET itself does not support 64bit counters"
);
return Err(Error::InvalidArgument);
}
let intc = external_interrupt_controller()?; let intc = external_interrupt_controller()?;