/* SPDX-License-Identifier: BSD-3-Clause
*
- * Copyright(c) 2019-2020 Xilinx, Inc.
+ * Copyright(c) 2019-2021 Xilinx, Inc.
* Copyright(c) 2012-2019 Solarflare Communications Inc.
*/
__in uint32_t id,
__in uint32_t us,
__in uint32_t flags,
+ __in uint32_t irq,
__in efx_evq_t *eep)
{
efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
- uint32_t irq;
+ uint32_t target_evq = 0;
efx_rc_t rc;
boolean_t low_latency;
_NOTE(ARGUNUSED(id)) /* buftbl id managed by MC */
+ EFSYS_ASSERT((flags & EFX_EVQ_FLAGS_EXTENDED_WIDTH) == 0);
+
/*
* NO_CONT_EV mode is only requested from the firmware when creating
* receive queues, but here it needs to be specified at event queue
/* INIT_EVQ expects function-relative vector number */
if ((flags & EFX_EVQ_FLAGS_NOTIFY_MASK) ==
EFX_EVQ_FLAGS_NOTIFY_INTERRUPT) {
- irq = index;
+ /* IRQ number is specified by caller */
} else if (index == EFX_EF10_ALWAYS_INTERRUPTING_EVQ_INDEX) {
- irq = index;
+ /* Use the first interrupt for always interrupting EvQ */
+ irq = 0;
flags = (flags & ~EFX_EVQ_FLAGS_NOTIFY_MASK) |
EFX_EVQ_FLAGS_NOTIFY_INTERRUPT;
} else {
- irq = EFX_EF10_ALWAYS_INTERRUPTING_EVQ_INDEX;
+ target_evq = EFX_EF10_ALWAYS_INTERRUPTING_EVQ_INDEX;
}
/*
* decision and low_latency hint is ignored.
*/
low_latency = encp->enc_datapath_cap_evb ? 0 : 1;
- rc = efx_mcdi_init_evq(enp, index, esmp, ndescs, irq, us, flags,
- low_latency);
+ rc = efx_mcdi_init_evq(enp, index, esmp, ndescs, irq, target_evq, us,
+ flags, low_latency);
if (rc != 0)
goto fail2;