File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -162,15 +162,15 @@ impl PciHeader {
162162
163163 pub fn command ( & self , access : & impl ConfigRegionAccess ) -> CommandRegister {
164164 let data = unsafe { access. read ( self . 0 , 0x4 ) . get_bits ( 0 ..16 ) } ;
165- CommandRegister :: from_bits_truncate ( data as u16 )
165+ CommandRegister :: from_bits_retain ( data as u16 )
166166 }
167167
168168 pub fn update_command < F > ( & self , access : & impl ConfigRegionAccess , f : F )
169169 where
170170 F : FnOnce ( CommandRegister ) -> CommandRegister ,
171171 {
172172 let mut data = unsafe { access. read ( self . 0 , 0x4 ) } ;
173- let new_command = f ( CommandRegister :: from_bits_truncate ( data. get_bits ( 0 ..16 ) as u16 ) ) ;
173+ let new_command = f ( CommandRegister :: from_bits_retain ( data. get_bits ( 0 ..16 ) as u16 ) ) ;
174174 data. set_bits ( 0 ..16 , new_command. bits ( ) as u32 ) ;
175175 unsafe {
176176 access. write ( self . 0 , 0x4 , data) ;
Original file line number Diff line number Diff line change @@ -139,5 +139,6 @@ bitflags::bitflags! {
139139 const SERR_ENABLE = 1 << 8 ;
140140 const FAST_BACK_TO_BACK_ENABLE = 1 << 9 ;
141141 const INTERRUPT_DISABLE = 1 << 10 ;
142+ const _ = !0 ;
142143 }
143144}
You can’t perform that action at this time.
0 commit comments