File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use std::sync::Arc;
10
10
11
11
use log:: error;
12
12
13
+ use crate :: status:: { ACKNOWLEDGE , DRIVER , FEATURES_OK } ;
13
14
use crate :: { VirtioDevice , WithDriverSelect } ;
14
15
use virtio_queue:: { Queue , QueueT } ;
15
16
@@ -183,10 +184,6 @@ where
183
184
// Accessing an unknown page has no effect.
184
185
_ => features,
185
186
} ;
186
-
187
- if page == 0 {
188
- <Self as VirtioDeviceActions >:: negotiate_driver_features ( self ) ;
189
- }
190
187
}
191
188
192
189
fn device_status ( & self ) -> u8 {
@@ -195,6 +192,9 @@ where
195
192
196
193
fn set_device_status ( & mut self , status : u8 ) {
197
194
self . borrow_mut ( ) . device_status = status;
195
+ if self . borrow_mut ( ) . device_status == ( ACKNOWLEDGE | DRIVER | FEATURES_OK ) {
196
+ <Self as VirtioDeviceActions >:: negotiate_driver_features ( self ) ;
197
+ }
198
198
}
199
199
200
200
fn activate ( & mut self ) -> Result < ( ) , Self :: E > {
You can’t perform that action at this time.
0 commit comments