Skip to content

Commit c9a0e7d

Browse files
committed
pci: fixes in PCI crate
Device Debug for some of the types we are consuming and also export some of the types that were effectively private to the containing module. Signed-off-by: Babis Chalios <[email protected]>
1 parent 338565e commit c9a0e7d

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/pci/src/configuration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ struct PciBar {
409409
r#type: Option<PciBarRegionType>,
410410
}
411411

412-
#[derive(Serialize, Deserialize)]
412+
#[derive(Debug, Serialize, Deserialize)]
413413
pub struct PciConfigurationState {
414414
registers: Vec<u32>,
415415
writable_bits: Vec<u32>,

src/pci/src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@ use serde::de::Visitor;
2424
pub use self::bus::{PciBus, PciConfigIo, PciConfigMmio, PciRoot, PciRootError};
2525
pub use self::configuration::{
2626
PciBarConfiguration, PciBarPrefetchable, PciBarRegionType, PciCapability, PciCapabilityId,
27-
PciClassCode, PciConfiguration, PciExpressCapabilityId, PciHeaderType, PciMassStorageSubclass,
28-
PciNetworkControllerSubclass, PciProgrammingInterface, PciSerialBusSubClass, PciSubclass,
29-
PCI_CONFIGURATION_ID,
27+
PciClassCode, PciConfiguration, PciConfigurationState, PciExpressCapabilityId, PciHeaderType,
28+
PciMassStorageSubclass, PciNetworkControllerSubclass, PciProgrammingInterface,
29+
PciSerialBusSubClass, PciSubclass, PCI_CONFIGURATION_ID,
3030
};
3131
pub use self::device::{
3232
BarReprogrammingParams, DeviceRelocation, Error as PciDeviceError, PciDevice,
3333
};
3434
pub use self::msi::{msi_num_enabled_vectors, MsiCap, MsiConfig};
3535
pub use self::msix::{
36-
Error as MsixError, MsixCap, MsixConfig, MsixTableEntry, MSIX_CONFIG_ID, MSIX_TABLE_ENTRY_SIZE,
36+
Error as MsixError, MsixCap, MsixConfig, MsixConfigState, MsixTableEntry, MSIX_CONFIG_ID,
37+
MSIX_TABLE_ENTRY_SIZE,
3738
};
3839

3940
/// PCI has four interrupt pins A->D.

src/pci/src/msix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl Default for MsixTableEntry {
5959
}
6060
}
6161

62-
#[derive(Serialize, Deserialize)]
62+
#[derive(Debug, Serialize, Deserialize)]
6363
pub struct MsixConfigState {
6464
table_entries: Vec<MsixTableEntry>,
6565
pba_entries: Vec<u64>,

0 commit comments

Comments
 (0)