diff options
author | jhb <jhb@FreeBSD.org> | 2015-05-28 22:01:50 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2015-05-28 22:01:50 +0000 |
commit | a2158a48ce1a105bab12222bc489bdf3416ae2cc (patch) | |
tree | a5e7bfbf84ce57b511065c85cc47c6976244f58e /sys/dev/ixl | |
parent | dce46f40950ace53058f9271895013fe4fb7fd13 (diff) | |
download | FreeBSD-src-a2158a48ce1a105bab12222bc489bdf3416ae2cc.zip FreeBSD-src-a2158a48ce1a105bab12222bc489bdf3416ae2cc.tar.gz |
Create a separate kobj interface for leaf-driver PCI IOV methods.
Leaf drivers should not import the PCI bus interface to add IOV handling.
Instead, move the IOV client methods to a separate kobj interface.
Differential Revision: https://reviews.freebsd.org/D2584
Reviewed by: rstone
Diffstat (limited to 'sys/dev/ixl')
-rw-r--r-- | sys/dev/ixl/if_ixl.c | 14 | ||||
-rw-r--r-- | sys/dev/ixl/ixl.h | 1 |
2 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index de4ee24..026bc9e 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -199,8 +199,8 @@ static int ixl_sysctl_switch_config(SYSCTL_HANDLER_ARGS); #ifdef PCI_IOV static int ixl_adminq_err_to_errno(enum i40e_admin_queue_err err); -static int ixl_init_iov(device_t dev, uint16_t num_vfs, const nvlist_t*); -static void ixl_uninit_iov(device_t dev); +static int ixl_iov_init(device_t dev, uint16_t num_vfs, const nvlist_t*); +static void ixl_iov_uninit(device_t dev); static int ixl_add_vf(device_t dev, uint16_t vfnum, const nvlist_t*); static void ixl_handle_vf_msg(struct ixl_pf *, @@ -222,9 +222,9 @@ static device_method_t ixl_methods[] = { DEVMETHOD(device_detach, ixl_detach), DEVMETHOD(device_shutdown, ixl_shutdown), #ifdef PCI_IOV - DEVMETHOD(pci_init_iov, ixl_init_iov), - DEVMETHOD(pci_uninit_iov, ixl_uninit_iov), - DEVMETHOD(pci_add_vf, ixl_add_vf), + DEVMETHOD(pci_iov_init, ixl_iov_init), + DEVMETHOD(pci_iov_uninit, ixl_iov_uninit), + DEVMETHOD(pci_iov_add_vf, ixl_add_vf), #endif {0, 0} }; @@ -6456,7 +6456,7 @@ ixl_adminq_err_to_errno(enum i40e_admin_queue_err err) } static int -ixl_init_iov(device_t dev, uint16_t num_vfs, const nvlist_t *params) +ixl_iov_init(device_t dev, uint16_t num_vfs, const nvlist_t *params) { struct ixl_pf *pf; struct i40e_hw *hw; @@ -6504,7 +6504,7 @@ fail: } static void -ixl_uninit_iov(device_t dev) +ixl_iov_uninit(device_t dev) { struct ixl_pf *pf; struct i40e_hw *hw; diff --git a/sys/dev/ixl/ixl.h b/sys/dev/ixl/ixl.h index 1ddfbca3..3348e1a 100644 --- a/sys/dev/ixl/ixl.h +++ b/sys/dev/ixl/ixl.h @@ -93,6 +93,7 @@ #ifdef PCI_IOV #include <sys/nv.h> #include <sys/iov_schema.h> +#include <dev/pci/pci_iov.h> #endif #include "i40e_type.h" |