sfxge: rename hunt interrupt methods to ef10 and use on Medford
All of these apply to both Huntington and Medford. Submitted by: Mark Spender <mspender at solarflare.com> Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4868
This commit is contained in:
parent
3c5bf8f1c2
commit
15f20ea67d
@ -101,17 +101,16 @@ static efx_intr_ops_t __efx_intr_siena_ops = {
|
||||
};
|
||||
#endif /* EFSYS_OPT_SIENA */
|
||||
|
||||
#if EFSYS_OPT_HUNTINGTON
|
||||
static efx_intr_ops_t __efx_intr_hunt_ops = {
|
||||
hunt_intr_init, /* eio_init */
|
||||
hunt_intr_enable, /* eio_enable */
|
||||
hunt_intr_disable, /* eio_disable */
|
||||
hunt_intr_disable_unlocked, /* eio_disable_unlocked */
|
||||
hunt_intr_trigger, /* eio_trigger */
|
||||
hunt_intr_fini, /* eio_fini */
|
||||
#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
|
||||
static efx_intr_ops_t __efx_intr_ef10_ops = {
|
||||
ef10_intr_init, /* eio_init */
|
||||
ef10_intr_enable, /* eio_enable */
|
||||
ef10_intr_disable, /* eio_disable */
|
||||
ef10_intr_disable_unlocked, /* eio_disable_unlocked */
|
||||
ef10_intr_trigger, /* eio_trigger */
|
||||
ef10_intr_fini, /* eio_fini */
|
||||
};
|
||||
#endif /* EFSYS_OPT_HUNTINGTON */
|
||||
|
||||
#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
|
||||
|
||||
__checkReturn efx_rc_t
|
||||
efx_intr_init(
|
||||
@ -152,10 +151,16 @@ efx_intr_init(
|
||||
|
||||
#if EFSYS_OPT_HUNTINGTON
|
||||
case EFX_FAMILY_HUNTINGTON:
|
||||
eiop = (efx_intr_ops_t *)&__efx_intr_hunt_ops;
|
||||
eiop = (efx_intr_ops_t *)&__efx_intr_ef10_ops;
|
||||
break;
|
||||
#endif /* EFSYS_OPT_HUNTINGTON */
|
||||
|
||||
#if EFSYS_OPT_MEDFORD
|
||||
case EFX_FAMILY_MEDFORD:
|
||||
eiop = (efx_intr_ops_t *)&__efx_intr_ef10_ops;
|
||||
break;
|
||||
#endif /* EFSYS_OPT_MEDFORD */
|
||||
|
||||
default:
|
||||
EFSYS_ASSERT(B_FALSE);
|
||||
rc = ENOTSUP;
|
||||
|
@ -112,30 +112,30 @@ hunt_ev_rxlabel_fini(
|
||||
/* INTR */
|
||||
|
||||
__checkReturn efx_rc_t
|
||||
hunt_intr_init(
|
||||
ef10_intr_init(
|
||||
__in efx_nic_t *enp,
|
||||
__in efx_intr_type_t type,
|
||||
__in efsys_mem_t *esmp);
|
||||
|
||||
void
|
||||
hunt_intr_enable(
|
||||
ef10_intr_enable(
|
||||
__in efx_nic_t *enp);
|
||||
|
||||
void
|
||||
hunt_intr_disable(
|
||||
ef10_intr_disable(
|
||||
__in efx_nic_t *enp);
|
||||
|
||||
void
|
||||
hunt_intr_disable_unlocked(
|
||||
ef10_intr_disable_unlocked(
|
||||
__in efx_nic_t *enp);
|
||||
|
||||
__checkReturn efx_rc_t
|
||||
hunt_intr_trigger(
|
||||
ef10_intr_trigger(
|
||||
__in efx_nic_t *enp,
|
||||
__in unsigned int level);
|
||||
|
||||
void
|
||||
hunt_intr_fini(
|
||||
ef10_intr_fini(
|
||||
__in efx_nic_t *enp);
|
||||
|
||||
/* NIC */
|
||||
|
@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
|
||||
#if EFSYS_OPT_HUNTINGTON
|
||||
|
||||
__checkReturn efx_rc_t
|
||||
hunt_intr_init(
|
||||
ef10_intr_init(
|
||||
__in efx_nic_t *enp,
|
||||
__in efx_intr_type_t type,
|
||||
__in efsys_mem_t *esmp)
|
||||
@ -50,7 +50,7 @@ hunt_intr_init(
|
||||
|
||||
|
||||
void
|
||||
hunt_intr_enable(
|
||||
ef10_intr_enable(
|
||||
__in efx_nic_t *enp)
|
||||
{
|
||||
_NOTE(ARGUNUSED(enp))
|
||||
@ -58,7 +58,7 @@ hunt_intr_enable(
|
||||
|
||||
|
||||
void
|
||||
hunt_intr_disable(
|
||||
ef10_intr_disable(
|
||||
__in efx_nic_t *enp)
|
||||
{
|
||||
_NOTE(ARGUNUSED(enp))
|
||||
@ -66,7 +66,7 @@ hunt_intr_disable(
|
||||
|
||||
|
||||
void
|
||||
hunt_intr_disable_unlocked(
|
||||
ef10_intr_disable_unlocked(
|
||||
__in efx_nic_t *enp)
|
||||
{
|
||||
_NOTE(ARGUNUSED(enp))
|
||||
@ -83,7 +83,8 @@ efx_mcdi_trigger_interrupt(
|
||||
MC_CMD_TRIGGER_INTERRUPT_OUT_LEN)];
|
||||
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) {
|
||||
rc = EINVAL;
|
||||
@ -118,7 +119,7 @@ fail1:
|
||||
}
|
||||
|
||||
__checkReturn efx_rc_t
|
||||
hunt_intr_trigger(
|
||||
ef10_intr_trigger(
|
||||
__in efx_nic_t *enp,
|
||||
__in unsigned int level)
|
||||
{
|
||||
@ -126,7 +127,10 @@ hunt_intr_trigger(
|
||||
efx_rc_t rc;
|
||||
|
||||
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;
|
||||
goto fail1;
|
||||
}
|
||||
@ -146,7 +150,7 @@ fail1:
|
||||
|
||||
|
||||
void
|
||||
hunt_intr_fini(
|
||||
ef10_intr_fini(
|
||||
__in efx_nic_t *enp)
|
||||
{
|
||||
_NOTE(ARGUNUSED(enp))
|
||||
|
Loading…
x
Reference in New Issue
Block a user