aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iavf
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/iavf')
-rw-r--r--sys/dev/iavf/iavf_iflib.h2
-rw-r--r--sys/dev/iavf/iavf_lib.c28
-rw-r--r--sys/dev/iavf/iavf_lib.h3
-rw-r--r--sys/dev/iavf/iavf_osdep.c2
-rw-r--r--sys/dev/iavf/if_iavf_iflib.c7
5 files changed, 7 insertions, 35 deletions
diff --git a/sys/dev/iavf/iavf_iflib.h b/sys/dev/iavf/iavf_iflib.h
index ec083d66a209..83891f9ed520 100644
--- a/sys/dev/iavf/iavf_iflib.h
+++ b/sys/dev/iavf/iavf_iflib.h
@@ -52,6 +52,7 @@
#include <sys/module.h>
#include <sys/sockio.h>
#include <sys/eventhandler.h>
+#include <sys/stdarg.h>
#include <sys/syslog.h>
#include <net/if.h>
@@ -94,7 +95,6 @@
#include <sys/smp.h>
#include <sys/sbuf.h>
#include <machine/smp.h>
-#include <machine/stdarg.h>
#include <net/ethernet.h>
#include <net/iflib.h>
#include "ifdi_if.h"
diff --git a/sys/dev/iavf/iavf_lib.c b/sys/dev/iavf/iavf_lib.c
index 883a722b3a03..433d31904ea4 100644
--- a/sys/dev/iavf/iavf_lib.c
+++ b/sys/dev/iavf/iavf_lib.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause */
-/* Copyright (c) 2021, Intel Corporation
+/* Copyright (c) 2024, Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -511,7 +511,7 @@ iavf_get_vsi_res_from_vf_res(struct iavf_sc *sc)
for (int i = 0; i < sc->vf_res->num_vsis; i++) {
/* XXX: We only use the first VSI we find */
- if (sc->vf_res->vsi_res[i].vsi_type == IAVF_VSI_SRIOV)
+ if (sc->vf_res->vsi_res[i].vsi_type == VIRTCHNL_VSI_SRIOV)
sc->vsi_res = &sc->vf_res->vsi_res[i];
}
if (!sc->vsi_res) {
@@ -1464,30 +1464,6 @@ iavf_mark_del_vlan_filter(struct iavf_sc *sc, u16 vtag)
}
/**
- * iavf_update_msix_devinfo - Fix MSIX values for pci_msix_count()
- * @dev: pointer to kernel device
- *
- * Fix cached MSI-X control register information. This is a workaround
- * for an issue where VFs spawned in non-passthrough mode on FreeBSD
- * will have their PCI information cached before the PF driver
- * finishes updating their PCI information.
- *
- * @pre Must be called before pci_msix_count()
- */
-void
-iavf_update_msix_devinfo(device_t dev)
-{
- struct pci_devinfo *dinfo;
- u32 msix_ctrl;
-
- dinfo = (struct pci_devinfo *)device_get_ivars(dev);
- /* We can hardcode this offset since we know the device */
- msix_ctrl = pci_read_config(dev, 0x70 + PCIR_MSIX_CTRL, 2);
- dinfo->cfg.msix.msix_ctrl = msix_ctrl;
- dinfo->cfg.msix.msix_msgnum = (msix_ctrl & PCIM_MSIXCTRL_TABLE_SIZE) + 1;
-}
-
-/**
* iavf_disable_queues_with_retries - Send PF multiple DISABLE_QUEUES messages
* @sc: device softc
*
diff --git a/sys/dev/iavf/iavf_lib.h b/sys/dev/iavf/iavf_lib.h
index f3ccd9f0c52f..48c0f4560e5a 100644
--- a/sys/dev/iavf/iavf_lib.h
+++ b/sys/dev/iavf/iavf_lib.h
@@ -40,7 +40,7 @@
#define _IAVF_LIB_H_
#include <sys/malloc.h>
-#include <machine/stdarg.h>
+#include <sys/stdarg.h>
#include <sys/sysctl.h>
#ifdef RSS
#include <net/rss_config.h>
@@ -474,7 +474,6 @@ struct iavf_mac_filter *
u64 iavf_baudrate_from_link_speed(struct iavf_sc *sc);
void iavf_add_vlan_filter(struct iavf_sc *sc, u16 vtag);
int iavf_mark_del_vlan_filter(struct iavf_sc *sc, u16 vtag);
-void iavf_update_msix_devinfo(device_t dev);
void iavf_disable_queues_with_retries(struct iavf_sc *);
int iavf_sysctl_current_speed(SYSCTL_HANDLER_ARGS);
diff --git a/sys/dev/iavf/iavf_osdep.c b/sys/dev/iavf/iavf_osdep.c
index 1c3aefe253a1..b81fded48926 100644
--- a/sys/dev/iavf/iavf_osdep.c
+++ b/sys/dev/iavf/iavf_osdep.c
@@ -37,7 +37,7 @@
* independent layer for sharing code between drivers on different operating
* systems.
*/
-#include <machine/stdarg.h>
+#include <sys/stdarg.h>
#include "iavf_iflib.h"
diff --git a/sys/dev/iavf/if_iavf_iflib.c b/sys/dev/iavf/if_iavf_iflib.c
index 714d34eeebe5..e4dd3b1e59a4 100644
--- a/sys/dev/iavf/if_iavf_iflib.c
+++ b/sys/dev/iavf/if_iavf_iflib.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause */
-/* Copyright (c) 2021, Intel Corporation
+/* Copyright (c) 2024, Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -370,7 +370,7 @@ iavf_if_attach_pre(if_ctx_t ctx)
}
scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0]
* sizeof(union iavf_32byte_rx_desc), DBA_ALIGN);
- scctx->isc_msix_bar = PCIR_BAR(IAVF_MSIX_BAR);
+ scctx->isc_msix_bar = pci_msix_table_bar(dev);
scctx->isc_tx_nsegments = IAVF_MAX_TX_SEGS;
scctx->isc_tx_tso_segments_max = IAVF_MAX_TSO_SEGS;
scctx->isc_tx_tso_size_max = IAVF_TSO_SIZE;
@@ -379,9 +379,6 @@ iavf_if_attach_pre(if_ctx_t ctx)
scctx->isc_capabilities = scctx->isc_capenable = IAVF_CAPS;
scctx->isc_tx_csum_flags = CSUM_OFFLOAD;
- /* Update OS cache of MSIX control register values */
- iavf_update_msix_devinfo(dev);
-
return (0);
err_vc_tq: