Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/sfxge/common/hunt_intr.c
Show All 33 Lines | |||||
#include "efsys.h" | #include "efsys.h" | ||||
#include "efx.h" | #include "efx.h" | ||||
#include "efx_impl.h" | #include "efx_impl.h" | ||||
#if EFSYS_OPT_HUNTINGTON | #if EFSYS_OPT_HUNTINGTON | ||||
__checkReturn efx_rc_t | __checkReturn efx_rc_t | ||||
hunt_intr_init( | ef10_intr_init( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in efx_intr_type_t type, | __in efx_intr_type_t type, | ||||
__in efsys_mem_t *esmp) | __in efsys_mem_t *esmp) | ||||
{ | { | ||||
_NOTE(ARGUNUSED(enp, type, esmp)) | _NOTE(ARGUNUSED(enp, type, esmp)) | ||||
return (0); | return (0); | ||||
} | } | ||||
void | void | ||||
hunt_intr_enable( | ef10_intr_enable( | ||||
__in efx_nic_t *enp) | __in efx_nic_t *enp) | ||||
{ | { | ||||
_NOTE(ARGUNUSED(enp)) | _NOTE(ARGUNUSED(enp)) | ||||
} | } | ||||
void | void | ||||
hunt_intr_disable( | ef10_intr_disable( | ||||
__in efx_nic_t *enp) | __in efx_nic_t *enp) | ||||
{ | { | ||||
_NOTE(ARGUNUSED(enp)) | _NOTE(ARGUNUSED(enp)) | ||||
} | } | ||||
void | void | ||||
hunt_intr_disable_unlocked( | ef10_intr_disable_unlocked( | ||||
__in efx_nic_t *enp) | __in efx_nic_t *enp) | ||||
{ | { | ||||
_NOTE(ARGUNUSED(enp)) | _NOTE(ARGUNUSED(enp)) | ||||
} | } | ||||
static __checkReturn efx_rc_t | static __checkReturn efx_rc_t | ||||
efx_mcdi_trigger_interrupt( | efx_mcdi_trigger_interrupt( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in unsigned int level) | __in unsigned int level) | ||||
{ | { | ||||
efx_mcdi_req_t req; | efx_mcdi_req_t req; | ||||
uint8_t payload[MAX(MC_CMD_TRIGGER_INTERRUPT_IN_LEN, | uint8_t payload[MAX(MC_CMD_TRIGGER_INTERRUPT_IN_LEN, | ||||
MC_CMD_TRIGGER_INTERRUPT_OUT_LEN)]; | MC_CMD_TRIGGER_INTERRUPT_OUT_LEN)]; | ||||
efx_rc_t rc; | efx_rc_t rc; | ||||
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); | EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON || | ||||
enp->en_family == EFX_FAMILY_MEDFORD); | |||||
if (level >= enp->en_nic_cfg.enc_intr_limit) { | if (level >= enp->en_nic_cfg.enc_intr_limit) { | ||||
rc = EINVAL; | rc = EINVAL; | ||||
goto fail1; | goto fail1; | ||||
} | } | ||||
(void) memset(payload, 0, sizeof (payload)); | (void) memset(payload, 0, sizeof (payload)); | ||||
req.emr_cmd = MC_CMD_TRIGGER_INTERRUPT; | req.emr_cmd = MC_CMD_TRIGGER_INTERRUPT; | ||||
Show All 18 Lines | |||||
fail1: | fail1: | ||||
EFSYS_PROBE1(fail1, efx_rc_t, rc); | EFSYS_PROBE1(fail1, efx_rc_t, rc); | ||||
return (rc); | return (rc); | ||||
} | } | ||||
__checkReturn efx_rc_t | __checkReturn efx_rc_t | ||||
hunt_intr_trigger( | ef10_intr_trigger( | ||||
__in efx_nic_t *enp, | __in efx_nic_t *enp, | ||||
__in unsigned int level) | __in unsigned int level) | ||||
{ | { | ||||
efx_nic_cfg_t *encp = &(enp->en_nic_cfg); | efx_nic_cfg_t *encp = &(enp->en_nic_cfg); | ||||
efx_rc_t rc; | efx_rc_t rc; | ||||
if (encp->enc_bug41750_workaround) { | if (encp->enc_bug41750_workaround) { | ||||
/* bug 41750: Test interrupts don't work on Greenport */ | /* | ||||
* bug 41750: Test interrupts don't work on Greenport | |||||
* bug 50084: Test interrupts don't work on VFs | |||||
*/ | |||||
rc = ENOTSUP; | rc = ENOTSUP; | ||||
goto fail1; | goto fail1; | ||||
} | } | ||||
if ((rc = efx_mcdi_trigger_interrupt(enp, level)) != 0) | if ((rc = efx_mcdi_trigger_interrupt(enp, level)) != 0) | ||||
goto fail2; | goto fail2; | ||||
return (0); | return (0); | ||||
fail2: | fail2: | ||||
EFSYS_PROBE(fail2); | EFSYS_PROBE(fail2); | ||||
fail1: | fail1: | ||||
EFSYS_PROBE1(fail1, efx_rc_t, rc); | EFSYS_PROBE1(fail1, efx_rc_t, rc); | ||||
return (rc); | return (rc); | ||||
} | } | ||||
void | void | ||||
hunt_intr_fini( | ef10_intr_fini( | ||||
__in efx_nic_t *enp) | __in efx_nic_t *enp) | ||||
{ | { | ||||
_NOTE(ARGUNUSED(enp)) | _NOTE(ARGUNUSED(enp)) | ||||
} | } | ||||
#endif /* EFSYS_OPT_HUNTINGTON */ | #endif /* EFSYS_OPT_HUNTINGTON */ |