Date: Sat, 4 Jun 2016 14:46:40 +0000 (UTC) From: Andrew Rybchenko <arybchik@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r301330 - stable/10/sys/dev/sfxge/common Message-ID: <201606041446.u54Ekewv096348@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arybchik Date: Sat Jun 4 14:46:40 2016 New Revision: 301330 URL: https://svnweb.freebsd.org/changeset/base/301330 Log: MFC r299403 sfxge(4): remove Falcon-specific code paths from common code Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_impl.h stable/10/sys/dev/sfxge/common/efx_intr.c stable/10/sys/dev/sfxge/common/efx_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx.h Sat Jun 4 14:45:18 2016 (r301329) +++ stable/10/sys/dev/sfxge/common/efx.h Sat Jun 4 14:46:40 2016 (r301330) @@ -59,7 +59,7 @@ typedef __success(return == 0) int efx_r typedef enum efx_family_e { EFX_FAMILY_INVALID, - EFX_FAMILY_FALCON, + EFX_FAMILY_FALCON, /* Obsolete and not supported */ EFX_FAMILY_SIENA, EFX_FAMILY_HUNTINGTON, EFX_FAMILY_MEDFORD, @@ -246,7 +246,6 @@ efx_mcdi_fini( /* INTR */ -#define EFX_NINTR_FALCON 64 #define EFX_NINTR_SIENA 1024 typedef enum efx_intr_type_e { Modified: stable/10/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_ev.c Sat Jun 4 14:45:18 2016 (r301329) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Sat Jun 4 14:46:40 2016 (r301330) @@ -547,7 +547,6 @@ falconsiena_ev_rx( __in const efx_ev_callbacks_t *eecp, __in_opt void *arg) { - efx_nic_t *enp = eep->ee_enp; uint32_t id; uint32_t size; uint32_t label; @@ -577,8 +576,7 @@ falconsiena_ev_rx( hdr_type = EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_HDR_TYPE); - is_v6 = (enp->en_family != EFX_FAMILY_FALCON && - EFX_QWORD_FIELD(*eqp, FSF_CZ_RX_EV_IPV6_PKT) != 0); + is_v6 = (EFX_QWORD_FIELD(*eqp, FSF_CZ_RX_EV_IPV6_PKT) != 0); /* * If packet is marked as OK and packet type is TCP/IP or @@ -671,7 +669,7 @@ falconsiena_ev_rx( * (which clears PKT_OK). If this is set, then don't trust * the PKT_TYPE field. */ - if (enp->en_family != EFX_FAMILY_FALCON && !ok) { + if (!ok) { uint32_t parse_err; parse_err = EFX_QWORD_FIELD(*eqp, FSF_CZ_RX_EV_PKT_NOT_PARSED); @@ -1222,14 +1220,9 @@ falconsiena_ev_qmoderate( /* If the value is zero then disable the timer */ if (us == 0) { - if (enp->en_family == EFX_FAMILY_FALCON) - EFX_POPULATE_DWORD_2(dword, - FRF_AB_TC_TIMER_MODE, FFE_AB_TIMER_MODE_DIS, - FRF_AB_TC_TIMER_VAL, 0); - else - EFX_POPULATE_DWORD_2(dword, - FRF_CZ_TC_TIMER_MODE, FFE_CZ_TIMER_MODE_DIS, - FRF_CZ_TC_TIMER_VAL, 0); + EFX_POPULATE_DWORD_2(dword, + FRF_CZ_TC_TIMER_MODE, FFE_CZ_TIMER_MODE_DIS, + FRF_CZ_TC_TIMER_VAL, 0); } else { uint32_t timer_val; @@ -1240,14 +1233,9 @@ falconsiena_ev_qmoderate( if (timer_val > 0) timer_val--; - if (enp->en_family == EFX_FAMILY_FALCON) - EFX_POPULATE_DWORD_2(dword, - FRF_AB_TC_TIMER_MODE, FFE_AB_TIMER_MODE_INT_HLDOFF, - FRF_AB_TIMER_VAL, timer_val); - else - EFX_POPULATE_DWORD_2(dword, - FRF_CZ_TC_TIMER_MODE, FFE_CZ_TIMER_MODE_INT_HLDOFF, - FRF_CZ_TC_TIMER_VAL, timer_val); + EFX_POPULATE_DWORD_2(dword, + FRF_CZ_TC_TIMER_MODE, FFE_CZ_TIMER_MODE_INT_HLDOFF, + FRF_CZ_TC_TIMER_VAL, timer_val); } locked = (eep->ee_index == 0) ? 1 : 0; @@ -1315,10 +1303,8 @@ falconsiena_ev_qcreate( #endif /* EFSYS_OPT_MCDI */ /* Set up the new event queue */ - if (enp->en_family != EFX_FAMILY_FALCON) { - EFX_POPULATE_OWORD_1(oword, FRF_CZ_TIMER_Q_EN, 1); - EFX_BAR_TBL_WRITEO(enp, FR_AZ_TIMER_TBL, index, &oword, B_TRUE); - } + EFX_POPULATE_OWORD_1(oword, FRF_CZ_TIMER_Q_EN, 1); + EFX_BAR_TBL_WRITEO(enp, FR_AZ_TIMER_TBL, index, &oword, B_TRUE); EFX_POPULATE_OWORD_3(oword, FRF_AZ_EVQ_EN, 1, FRF_AZ_EVQ_SIZE, size, FRF_AZ_EVQ_BUF_BASE_ID, id); @@ -1432,11 +1418,8 @@ falconsiena_ev_qdestroy( EFX_BAR_TBL_WRITEO(enp, FR_AZ_EVQ_PTR_TBL, eep->ee_index, &oword, B_TRUE); - if (enp->en_family != EFX_FAMILY_FALCON) { - EFX_ZERO_OWORD(oword); - EFX_BAR_TBL_WRITEO(enp, FR_AZ_TIMER_TBL, - eep->ee_index, &oword, B_TRUE); - } + EFX_ZERO_OWORD(oword); + EFX_BAR_TBL_WRITEO(enp, FR_AZ_TIMER_TBL, eep->ee_index, &oword, B_TRUE); } static void Modified: stable/10/sys/dev/sfxge/common/efx_impl.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_impl.h Sat Jun 4 14:45:18 2016 (r301329) +++ stable/10/sys/dev/sfxge/common/efx_impl.h Sat Jun 4 14:46:40 2016 (r301330) @@ -788,10 +788,6 @@ struct efx_txq_s { char rev; \ \ switch ((_enp)->en_family) { \ - case EFX_FAMILY_FALCON: \ - rev = 'B'; \ - break; \ - \ case EFX_FAMILY_SIENA: \ rev = 'C'; \ break; \ Modified: stable/10/sys/dev/sfxge/common/efx_intr.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_intr.c Sat Jun 4 14:45:18 2016 (r301329) +++ stable/10/sys/dev/sfxge/common/efx_intr.c Sat Jun 4 14:46:40 2016 (r301330) @@ -397,24 +397,9 @@ falconsiena_intr_trigger( /* bug16757: No event queues can be initialized */ EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_EV)); - switch (enp->en_family) { - case EFX_FAMILY_FALCON: - if (level >= EFX_NINTR_FALCON) { - rc = EINVAL; - goto fail1; - } - break; - - case EFX_FAMILY_SIENA: - if (level >= EFX_NINTR_SIENA) { - rc = EINVAL; - goto fail1; - } - break; - - default: - EFSYS_ASSERT(B_FALSE); - break; + if (level >= EFX_NINTR_SIENA) { + rc = EINVAL; + goto fail1; } if (level > EFX_MASK32(FRF_AZ_KER_INT_LEVE_SEL)) Modified: stable/10/sys/dev/sfxge/common/efx_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_rx.c Sat Jun 4 14:45:18 2016 (r301329) +++ stable/10/sys/dev/sfxge/common/efx_rx.c Sat Jun 4 14:46:40 2016 (r301330) @@ -692,11 +692,6 @@ fail1: do { \ efx_oword_t oword; \ \ - if ((_enp)->en_family == EFX_FAMILY_FALCON) { \ - (_rc) = ((_ip) || (_tcp)) ? ENOTSUP : 0; \ - break; \ - } \ - \ EFX_BAR_READO((_enp), FR_CZ_RX_RSS_IPV6_REG3, &oword); \ EFX_SET_OWORD_FIELD(oword, \ FRF_CZ_RX_RSS_IPV6_THASH_ENABLE, 1); \ @@ -799,8 +794,6 @@ falconsiena_rx_scale_key_set( if ((enp->en_features & EFX_FEATURE_IPV6) == 0) goto done; - EFSYS_ASSERT3U(enp->en_family, !=, EFX_FAMILY_FALCON); - byte = 0; /* Write Toeplitz IPv6 hash key 3 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606041446.u54Ekewv096348>