pci

package
v0.0.0-...-433fd04 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeviceDriverOverride

func DeviceDriverOverride(pciDev Device, driverOverride string) error

DeviceDriverOverride unbinds the device, sets the driver override preference, then probes the device, and waits for it to be activated with the specified driver.

func DeviceIOMMUGroup

func DeviceIOMMUGroup(slotName string) (uint64, error)

DeviceIOMMUGroup returns the IOMMU group for a PCI device.

func DeviceProbe

func DeviceProbe(pciDev Device) error

DeviceProbe probes a PCI device using its PCI Slot Name.

func DeviceSetDriverOverride

func DeviceSetDriverOverride(pciDev Device, driverOverride string) error

DeviceSetDriverOverride registers an override driver for a PCI device using its PCI Slot Name.

func DeviceUnbind

func DeviceUnbind(pciDev Device) error

DeviceUnbind unbinds a PCI device from the OS using its PCI Slot Name.

func NormaliseAddress

func NormaliseAddress(addr string) string

NormaliseAddress converts common PCI address notation to the kernel's notation.

Types

type Device

type Device struct {
	ID       string
	SlotName string
	Driver   string
}

Device represents info about a PCI uevent device.

func ParseUeventFile

func ParseUeventFile(ueventFilePath string) (Device, error)

ParseUeventFile returns the PCI device info for a given uevent file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL