Skip to content

Commit 6550689

Browse files
committed
ixv: Reject unsupported E610 Hyper-V VFs
E610 Hyper-V VFs use PCI configuration space communication instead of the native PF/VF mailbox. The generic E610 match currently attaches native mailbox operations to those devices, and the imported Hyper-V subdevice identifier is incorrect. Correct the subdevice identifier to 0x00ff, as used by DPDK shared ixgbe code, and reject that subtype until ixv has a complete Hyper-V operations table. Sponsored by: BBOX.io (cherry picked from commit 08c41a6)
1 parent 926bb8b commit 6550689

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

sys/dev/ixgbe/if_ixv.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ static const pci_vendor_info_t ixv_vendor_info_array[] =
7878
* Function prototypes
7979
************************************************************************/
8080
static void *ixv_register(device_t);
81+
static int ixv_probe(device_t);
8182
static int ixv_if_attach_pre(if_ctx_t);
8283
static int ixv_if_attach_post(if_ctx_t);
8384
static int ixv_if_detach(if_ctx_t);
@@ -147,7 +148,7 @@ static int ixv_msix_mbx(void *);
147148
static device_method_t ixv_methods[] = {
148149
/* Device interface */
149150
DEVMETHOD(device_register, ixv_register),
150-
DEVMETHOD(device_probe, iflib_device_probe),
151+
DEVMETHOD(device_probe, ixv_probe),
151152
DEVMETHOD(device_attach, iflib_device_attach),
152153
DEVMETHOD(device_detach, iflib_device_detach),
153154
DEVMETHOD(device_shutdown, iflib_device_shutdown),
@@ -234,6 +235,16 @@ ixv_register(device_t dev)
234235
return (&ixv_sctx_init);
235236
}
236237

238+
static int
239+
ixv_probe(device_t dev)
240+
{
241+
if (pci_get_device(dev) == IXGBE_DEV_ID_E610_VF &&
242+
pci_get_subdevice(dev) == IXGBE_SUBDEV_ID_E610_VF_HV)
243+
return (ENXIO);
244+
245+
return (iflib_device_probe(dev));
246+
}
247+
237248
/************************************************************************
238249
* ixv_if_tx_queues_alloc
239250
************************************************************************/

sys/dev/ixgbe/ixgbe_type.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
#define IXGBE_DEV_ID_X550EM_X_VF 0x15A8
164164
#define IXGBE_DEV_ID_X550EM_X_VF_HV 0x15A9
165165
#define IXGBE_DEV_ID_E610_VF 0x57AD
166-
#define IXGBE_SUBDEV_ID_E610_VF_HV 0x0001
166+
#define IXGBE_SUBDEV_ID_E610_VF_HV 0x00FF
167167

168168
#define IXGBE_CAT(r, m) IXGBE_##r##m
169169

0 commit comments

Comments
 (0)