[PATCH v2 3/6] common/sfc_efx/base: skip netport event subscriptions on VFs
Ivan Malov <[email protected]>
| Newsgroups | org.dpdk.dev |
|---|---|
| Message-ID | <[email protected]> |
Subscribing to netport events is not permitted on VFs. Signed-off-by: Ivan Malov <[email protected]> Reviewed-by: Andy Moreton <[email protected]> --- drivers/common/sfc_efx/base/efx_np.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/common/sfc_efx/base/efx_np.c b/drivers/common/sfc_efx/base/efx_np.c index 7a30567fe0..90a5944b85 100644 --- a/drivers/common/sfc_efx/base/efx_np.c +++ b/drivers/common/sfc_efx/base/efx_np.c @@ -989,6 +989,7 @@ efx_np_set_event_mask( __in efx_np_handle_t nph, __in boolean_t want_linkchange_events) { + const efx_nic_cfg_t *encp = &enp->en_nic_cfg; EFX_MCDI_DECLARE_BUF(payload, MC_CMD_SET_NETPORT_EVENTS_MASK_IN_LEN, MC_CMD_SET_NETPORT_EVENTS_MASK_OUT_LEN); @@ -996,6 +997,10 @@ efx_np_set_event_mask( efx_dword_t dword; efx_rc_t rc; + /* VFs do not allow subscription to link change events. */ + if (EFX_PCI_FUNCTION_IS_VF(encp)) + return (0); + req.emr_out_length = MC_CMD_SET_NETPORT_EVENTS_MASK_OUT_LEN; req.emr_in_length = MC_CMD_SET_NETPORT_EVENTS_MASK_IN_LEN; req.emr_cmd = MC_CMD_SET_NETPORT_EVENTS_MASK; -- 2.47.3