path: root/sys/dev/ixl
diff options
authorJohn Baldwin <jhb@FreeBSD.org>2015-05-28 22:01:50 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2015-05-28 22:01:50 +0000
commitf3bb92515317f9b66fca73deca375a79d49dc54a (patch)
treea5e7bfbf84ce57b511065c85cc47c6976244f58e /sys/dev/ixl
parente54a659a263d1b242c0a73975134def472847ab4 (diff)
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
Notes: svn path=/head/; revision=283670
Diffstat (limited to 'sys/dev/ixl')
2 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c
index de4ee2450668..026bc9ed9f68 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),
{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 1ddfbca3d7d7..3348e1abae27 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>
#include "i40e_type.h"