From owner-svn-src-head@freebsd.org Wed May 11 06:16:55 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D210B36DE9; Wed, 11 May 2016 06:16:55 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 094581703; Wed, 11 May 2016 06:16:54 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4B6GsBG038479; Wed, 11 May 2016 06:16:54 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4B6GrB8038474; Wed, 11 May 2016 06:16:53 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201605110616.u4B6GrB8038474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 11 May 2016 06:16:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299403 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2016 06:16:55 -0000 Author: arybchik Date: Wed May 11 06:16:53 2016 New Revision: 299403 URL: https://svnweb.freebsd.org/changeset/base/299403 Log: sfxge(4): remove Falcon-specific code paths from common code Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6289 Modified: head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_ev.c head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/efx_intr.c head/sys/dev/sfxge/common/efx_rx.c Modified: head/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Wed May 11 06:15:07 2016 (r299402) +++ head/sys/dev/sfxge/common/efx.h Wed May 11 06:16:53 2016 (r299403) @@ -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: head/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- head/sys/dev/sfxge/common/efx_ev.c Wed May 11 06:15:07 2016 (r299402) +++ head/sys/dev/sfxge/common/efx_ev.c Wed May 11 06:16:53 2016 (r299403) @@ -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: head/sys/dev/sfxge/common/efx_impl.h ============================================================================== --- head/sys/dev/sfxge/common/efx_impl.h Wed May 11 06:15:07 2016 (r299402) +++ head/sys/dev/sfxge/common/efx_impl.h Wed May 11 06:16:53 2016 (r299403) @@ -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: head/sys/dev/sfxge/common/efx_intr.c ============================================================================== --- head/sys/dev/sfxge/common/efx_intr.c Wed May 11 06:15:07 2016 (r299402) +++ head/sys/dev/sfxge/common/efx_intr.c Wed May 11 06:16:53 2016 (r299403) @@ -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: head/sys/dev/sfxge/common/efx_rx.c ============================================================================== --- head/sys/dev/sfxge/common/efx_rx.c Wed May 11 06:15:07 2016 (r299402) +++ head/sys/dev/sfxge/common/efx_rx.c Wed May 11 06:16:53 2016 (r299403) @@ -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 */