|
@@ -447,7 +447,11 @@ impl Transport for MmioTransport {
|
|
|
// Safe because self.header points to a valid VirtIO MMIO region.
|
|
|
unsafe {
|
|
|
volwrite!(self.header, queue_sel, queue.into());
|
|
|
+
|
|
|
volwrite!(self.header, queue_ready, 0);
|
|
|
+ // Wait until we read the same value back, to ensure synchronisation (see 4.2.2.2).
|
|
|
+ while volread!(self.header, queue_ready) != 0 {}
|
|
|
+
|
|
|
volwrite!(self.header, queue_num, 0);
|
|
|
volwrite!(self.header, queue_desc_low, 0);
|
|
|
volwrite!(self.header, queue_desc_high, 0);
|