summaryrefslogtreecommitdiffstats
path: root/src/vlib/pci
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-03-05 14:08:33 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-05 14:40:57 +0000
commitf313b747ad4313a5cadfdb6aa7eb66ce8bf7958f (patch)
tree26164d3a067fcbeafa4d1cba28309bebd1143225 /src/vlib/pci
parent9e09ff394ac0e731b5b33caf4d0cddff8de570b4 (diff)
vlib: add functions to dynamically open/close PCI device
Old code was only allowing PCIdevices to be scanned during startup, now driver can open and close device without restart of vpp. Change-Id: I1a06511e3f16f896101b43dac2bad420b6e6c35e Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/pci')
-rw-r--r--src/vlib/pci/pci.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vlib/pci/pci.h b/src/vlib/pci/pci.h
index f4d3674b30d..144eb3f598e 100644
--- a/src/vlib/pci/pci.h
+++ b/src/vlib/pci/pci.h
@@ -249,6 +249,11 @@ vlib_pci_bus_master_enable (vlib_pci_dev_handle_t h)
return vlib_pci_write_config_u16 (h, 4, &command);
}
+clib_error_t *vlib_pci_device_open (vlib_pci_addr_t * addr,
+ pci_device_id_t ids[],
+ vlib_pci_dev_handle_t * handle);
+void vlib_pci_device_close (vlib_pci_dev_handle_t h);
+
clib_error_t *vlib_pci_map_region (vlib_pci_dev_handle_t h, u32 resource,
void **result);