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;
1010
1111use log:: error;
1212
13+ use crate :: status:: { ACKNOWLEDGE , DRIVER , FEATURES_OK } ;
1314use crate :: { VirtioDevice , WithDriverSelect } ;
1415use virtio_queue:: { Queue , QueueT } ;
1516
@@ -183,10 +184,6 @@ where
183184 // Accessing an unknown page has no effect.
184185 _ => features,
185186 } ;
186-
187- if page == 0 {
188- <Self as VirtioDeviceActions >:: negotiate_driver_features ( self ) ;
189- }
190187 }
191188
192189 fn device_status ( & self ) -> u8 {
@@ -195,6 +192,9 @@ where
195192
196193 fn set_device_status ( & mut self , status : u8 ) {
197194 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+ }
198198 }
199199
200200 fn activate ( & mut self ) -> Result < ( ) , Self :: E > {
You can’t perform that action at this time.
0 commit comments