File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ struct PciRegister3 {
3737#[ allow( unused) ]
3838#[ derive( Clone , Copy , Debug ) ]
3939struct PciHeader1Register6 {
40- secondary_latency_timer : u8 ,
41- subordinate_bus : u8 ,
42- secondary_bus : u8 ,
4340 primary_bus : u8 ,
41+ secondary_bus : u8 ,
42+ subordinate_bus : u8 ,
43+ secondary_latency_timer : u8 ,
4444}
4545
4646/// Read the 4byte pci register with the given `addr` and cast it into the given structured representation.
@@ -93,7 +93,8 @@ fn visit_function(
9393 }
9494 queue. insert ( FullPciIoAddress :: new ( proto. segment_nr ( ) , addr) ) ;
9595 let ( base_class, sub_class) = get_classes ( proto, addr) ?;
96- if base_class == 0x6 && sub_class == 0x4 && get_header_type ( proto, addr) ? == 0x01 {
96+ let header_type = get_header_type ( proto, addr) ? & 0b01111111 ;
97+ if base_class == 0x6 && sub_class == 0x4 && header_type == 0x01 {
9798 // This is a PCI-to-PCI bridge controller. The current `addr` is the address with which it's
9899 // mounted in the PCI tree we are currently traversing. Now we query its header, where
99100 // the bridge tells us a range of addresses [secondary;subordinate], with which the other
You can’t perform that action at this time.
0 commit comments