Commit 832f830c authored by Jeremy Soller's avatar Jeremy Soller

Update EventSte structure

parent e83471f5
......@@ -6,8 +6,9 @@ use super::trb::Trb;
#[repr(packed)]
pub struct EventRingSte {
pub address: Mmio<u64>,
pub size: Mmio<u32>,
_rsvd: Mmio<u32>,
pub size: Mmio<u16>,
_rsvd: Mmio<u16>,
_rsvd2: Mmio<u32>,
}
pub struct EventRing {
......@@ -23,7 +24,7 @@ impl EventRing {
};
ring.ste.address.write(ring.trbs.physical() as u64);
ring.ste.size.write(ring.trbs.len() as u32);
ring.ste.size.write(ring.trbs.len() as u16);
Ok(ring)
}
......
......@@ -111,12 +111,12 @@ impl Xhci {
// Set event ring segment table registers
println!(" - Interrupter 0: {:X}", self.run.ints.as_ptr() as usize);
println!(" - Write ERDP");
self.run.ints[0].erdp.write(self.cmd.events.trbs.physical() as u64);
println!(" - Write ERSTZ");
self.run.ints[0].erstsz.write(1);
println!(" - Write ERSTBA: {:X}", self.cmd.events.ste.physical() as u64);
self.run.ints[0].erstba.write(self.cmd.events.ste.physical() as u64);
println!(" - Write ERDP");
self.run.ints[0].erdp.write(self.cmd.events.trbs.physical() as u64);
// Set run/stop to 1
println!(" - Start");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment