@@ -258,16 +258,16 @@ mod tests {
258258 // The max size for the queue in `Dummy` is 256.
259259 assert_eq ! ( mmio_read( & d, 0x34 ) , 256 ) ;
260260
261- assert_eq ! ( d. cfg. queues[ 0 ] . size, 256 ) ;
261+ assert_eq ! ( d. cfg. queues[ 0 ] . state . size, 256 ) ;
262262 d. write ( 0x38 , & 32u32 . to_le_bytes ( ) ) ;
263263 // Updating the queue field has no effect due to invalid device status.
264- assert_eq ! ( d. cfg. queues[ 0 ] . size, 256 ) ;
264+ assert_eq ! ( d. cfg. queues[ 0 ] . state . size, 256 ) ;
265265
266266 d. cfg . device_status |= status:: FEATURES_OK ;
267267
268268 // Let's try the update again.
269269 d. write ( 0x38 , & 32u32 . to_le_bytes ( ) ) ;
270- assert_eq ! ( d. cfg. queues[ 0 ] . size, 32 ) ;
270+ assert_eq ! ( d. cfg. queues[ 0 ] . state . size, 32 ) ;
271271
272272 // The queue in `Dummy` is not ready yet.
273273 assert_eq ! ( mmio_read( & d, 0x44 ) , 0 ) ;
@@ -281,23 +281,23 @@ mod tests {
281281 d. write ( 0x50 , & 2u32 . to_le_bytes ( ) ) ;
282282 assert_eq ! ( d. last_queue_notify, 2 ) ;
283283
284- assert_eq ! ( d. cfg. queues[ 0 ] . desc_table. 0 , 0 ) ;
284+ assert_eq ! ( d. cfg. queues[ 0 ] . state . desc_table. 0 , 0 ) ;
285285 d. write ( 0x80 , & 1u32 . to_le_bytes ( ) ) ;
286- assert_eq ! ( d. cfg. queues[ 0 ] . desc_table. 0 , 1 ) ;
286+ assert_eq ! ( d. cfg. queues[ 0 ] . state . desc_table. 0 , 1 ) ;
287287 d. write ( 0x84 , & 2u32 . to_le_bytes ( ) ) ;
288- assert_eq ! ( d. cfg. queues[ 0 ] . desc_table. 0 , ( 2 << 32 ) + 1 ) ;
288+ assert_eq ! ( d. cfg. queues[ 0 ] . state . desc_table. 0 , ( 2 << 32 ) + 1 ) ;
289289
290- assert_eq ! ( d. cfg. queues[ 0 ] . avail_ring. 0 , 0 ) ;
290+ assert_eq ! ( d. cfg. queues[ 0 ] . state . avail_ring. 0 , 0 ) ;
291291 d. write ( 0x90 , & 1u32 . to_le_bytes ( ) ) ;
292- assert_eq ! ( d. cfg. queues[ 0 ] . avail_ring. 0 , 1 ) ;
292+ assert_eq ! ( d. cfg. queues[ 0 ] . state . avail_ring. 0 , 1 ) ;
293293 d. write ( 0x94 , & 2u32 . to_le_bytes ( ) ) ;
294- assert_eq ! ( d. cfg. queues[ 0 ] . avail_ring. 0 , ( 2 << 32 ) + 1 ) ;
294+ assert_eq ! ( d. cfg. queues[ 0 ] . state . avail_ring. 0 , ( 2 << 32 ) + 1 ) ;
295295
296- assert_eq ! ( d. cfg. queues[ 0 ] . used_ring. 0 , 0 ) ;
296+ assert_eq ! ( d. cfg. queues[ 0 ] . state . used_ring. 0 , 0 ) ;
297297 d. write ( 0xa0 , & 1u32 . to_le_bytes ( ) ) ;
298- assert_eq ! ( d. cfg. queues[ 0 ] . used_ring. 0 , 1 ) ;
298+ assert_eq ! ( d. cfg. queues[ 0 ] . state . used_ring. 0 , 1 ) ;
299299 d. write ( 0xa4 , & 2u32 . to_le_bytes ( ) ) ;
300- assert_eq ! ( d. cfg. queues[ 0 ] . used_ring. 0 , ( 2 << 32 ) + 1 ) ;
300+ assert_eq ! ( d. cfg. queues[ 0 ] . state . used_ring. 0 , ( 2 << 32 ) + 1 ) ;
301301
302302 // Let's select a non-existent queue.
303303 d. write ( 0x30 , & 1u32 . to_le_bytes ( ) ) ;
0 commit comments