pcid: Rename PcidServerHandle to PciFunctionHandle

This commit is contained in:
bjorn3
2024-06-15 15:05:42 +02:00
parent 3299a070f2
commit fdb9ea816b
20 changed files with 51 additions and 51 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ use crate::{probe::MappedMsixRegs, MSIX_PRIMARY_VECTOR};
use pcid_interface::*;
pub fn enable_msix(pcid_handle: &mut PcidServerHandle) -> Result<File, Error> {
pub fn enable_msix(pcid_handle: &mut PciFunctionHandle) -> Result<File, Error> {
let pci_config = pcid_handle.fetch_config()?;
// Extended message signaled interrupts.
@@ -50,7 +50,7 @@ pub fn enable_msix(pcid_handle: &mut PcidServerHandle) -> Result<File, Error> {
pub fn probe_legacy_port_transport(
pci_config: &SubdriverArguments,
pcid_handle: &mut PcidServerHandle,
pcid_handle: &mut PciFunctionHandle,
) -> Result<Device, Error> {
let port = pci_config.func.bars[0].expect_port();
+2 -2
View File
@@ -41,7 +41,7 @@ static_assertions::const_assert_eq!(std::mem::size_of::<MsixTableEntry>(), 16);
pub const MSIX_PRIMARY_VECTOR: u16 = 0;
#[cfg(not(target_arch = "x86_64"))]
fn enable_msix(pcid_handle: &mut PcidServerHandle) -> Result<File, Error> {
fn enable_msix(pcid_handle: &mut PciFunctionHandle) -> Result<File, Error> {
panic!("Msi-X only supported on x86_64");
}
@@ -59,7 +59,7 @@ fn enable_msix(pcid_handle: &mut PcidServerHandle) -> Result<File, Error> {
///
/// ## Panics
/// This function panics if the device is not a virtio device.
pub fn probe_device(pcid_handle: &mut PcidServerHandle) -> Result<Device, Error> {
pub fn probe_device(pcid_handle: &mut PciFunctionHandle) -> Result<Device, Error> {
let pci_config = pcid_handle.fetch_config()?;
assert_eq!(