xhci: Workaround for missing interrupts
This commit is contained in:
@@ -209,6 +209,8 @@ fn get_int_method(pcid_handle: &mut PcidServerHandle, address: usize) -> (Option
|
||||
|
||||
method
|
||||
} else if pci_config.func.legacy_interrupt_pin.is_some() {
|
||||
info!("Legacy IRQ {}", irq);
|
||||
|
||||
// legacy INTx# interrupt pins.
|
||||
(Some(File::open(format!("irq:{}", irq)).expect("xhcid: failed to open legacy IRQ file")), InterruptMethod::Intx)
|
||||
} else {
|
||||
|
||||
@@ -162,7 +162,7 @@ impl IrqReactor {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
debug!("IRQ reactor received an IRQ");
|
||||
trace!("IRQ reactor received an IRQ");
|
||||
|
||||
let _ = self.irq_file.as_mut().unwrap().write(&buffer);
|
||||
|
||||
|
||||
@@ -253,6 +253,16 @@ impl Xhci {
|
||||
&self,
|
||||
f: F,
|
||||
) -> (Trb, Trb) {
|
||||
{
|
||||
// If ERDP EHB bit is set, clear it before sending command
|
||||
//TODO: find out why this bit is set earlier!
|
||||
let mut run = self.run.lock().unwrap();
|
||||
let mut int = &mut run.ints[0];
|
||||
if int.erdp.readf(1 << 3) {
|
||||
int.erdp.writef(1 << 3, true);
|
||||
}
|
||||
}
|
||||
|
||||
let next_event = {
|
||||
let mut command_ring = self.cmd.lock().unwrap();
|
||||
let (cmd_index, cycle) = (command_ring.next_index(), command_ring.cycle);
|
||||
|
||||
Reference in New Issue
Block a user