From owner-svn-src-stable@freebsd.org Thu Jan 14 15:58:32 2016 Return-Path: Delivered-To: svn-src-stable@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 7457FA8352E; Thu, 14 Jan 2016 15:58:32 +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 491D11A78; Thu, 14 Jan 2016 15:58:32 +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 u0EFwVaq053361; Thu, 14 Jan 2016 15:58:31 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0EFwURs053357; Thu, 14 Jan 2016 15:58:30 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201601141558.u0EFwURs053357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 14 Jan 2016 15:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293986 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2016 15:58:32 -0000 Author: arybchik Date: Thu Jan 14 15:58:30 2016 New Revision: 293986 URL: https://svnweb.freebsd.org/changeset/base/293986 Log: MFC r293752 sfxge: rename hunt ev methods to ef10 and use for Medford Submitted by: Mark Spender Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/hunt_ev.c stable/10/sys/dev/sfxge/common/hunt_impl.h stable/10/sys/dev/sfxge/common/hunt_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_ev.c Thu Jan 14 15:57:55 2016 (r293985) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Thu Jan 14 15:58:30 2016 (r293986) @@ -139,20 +139,20 @@ static efx_ev_ops_t __efx_ev_siena_ops = }; #endif /* EFSYS_OPT_SIENA */ -#if EFSYS_OPT_HUNTINGTON -static efx_ev_ops_t __efx_ev_hunt_ops = { - hunt_ev_init, /* eevo_init */ - hunt_ev_fini, /* eevo_fini */ - hunt_ev_qcreate, /* eevo_qcreate */ - hunt_ev_qdestroy, /* eevo_qdestroy */ - hunt_ev_qprime, /* eevo_qprime */ - hunt_ev_qpost, /* eevo_qpost */ - hunt_ev_qmoderate, /* eevo_qmoderate */ +#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD +static efx_ev_ops_t __efx_ev_ef10_ops = { + ef10_ev_init, /* eevo_init */ + ef10_ev_fini, /* eevo_fini */ + ef10_ev_qcreate, /* eevo_qcreate */ + ef10_ev_qdestroy, /* eevo_qdestroy */ + ef10_ev_qprime, /* eevo_qprime */ + ef10_ev_qpost, /* eevo_qpost */ + ef10_ev_qmoderate, /* eevo_qmoderate */ #if EFSYS_OPT_QSTATS - hunt_ev_qstats_update, /* eevo_qstats_update */ + ef10_ev_qstats_update, /* eevo_qstats_update */ #endif }; -#endif /* EFSYS_OPT_HUNTINGTON */ +#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */ __checkReturn efx_rc_t @@ -185,10 +185,16 @@ efx_ev_init( #if EFSYS_OPT_HUNTINGTON case EFX_FAMILY_HUNTINGTON: - eevop = (efx_ev_ops_t *)&__efx_ev_hunt_ops; + eevop = (efx_ev_ops_t *)&__efx_ev_ef10_ops; break; #endif /* EFSYS_OPT_HUNTINGTON */ +#if EFSYS_OPT_MEDFORD + case EFX_FAMILY_MEDFORD: + eevop = (efx_ev_ops_t *)&__efx_ev_ef10_ops; + break; +#endif /* EFSYS_OPT_MEDFORD */ + default: EFSYS_ASSERT(0); rc = ENOTSUP; Modified: stable/10/sys/dev/sfxge/common/hunt_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/hunt_ev.c Thu Jan 14 15:57:55 2016 (r293985) +++ stable/10/sys/dev/sfxge/common/hunt_ev.c Thu Jan 14 15:58:30 2016 (r293986) @@ -54,35 +54,35 @@ __FBSDID("$FreeBSD$"); static __checkReturn boolean_t -hunt_ev_rx( +ef10_ev_rx( __in efx_evq_t *eep, __in efx_qword_t *eqp, __in const efx_ev_callbacks_t *eecp, __in_opt void *arg); static __checkReturn boolean_t -hunt_ev_tx( +ef10_ev_tx( __in efx_evq_t *eep, __in efx_qword_t *eqp, __in const efx_ev_callbacks_t *eecp, __in_opt void *arg); static __checkReturn boolean_t -hunt_ev_driver( +ef10_ev_driver( __in efx_evq_t *eep, __in efx_qword_t *eqp, __in const efx_ev_callbacks_t *eecp, __in_opt void *arg); static __checkReturn boolean_t -hunt_ev_drv_gen( +ef10_ev_drv_gen( __in efx_evq_t *eep, __in efx_qword_t *eqp, __in const efx_ev_callbacks_t *eecp, __in_opt void *arg); static __checkReturn boolean_t -hunt_ev_mcdi( +ef10_ev_mcdi( __in efx_evq_t *eep, __in efx_qword_t *eqp, __in const efx_ev_callbacks_t *eecp, @@ -230,7 +230,7 @@ fail1: __checkReturn efx_rc_t -hunt_ev_init( +ef10_ev_init( __in efx_nic_t *enp) { _NOTE(ARGUNUSED(enp)) @@ -238,14 +238,14 @@ hunt_ev_init( } void -hunt_ev_fini( +ef10_ev_fini( __in efx_nic_t *enp) { _NOTE(ARGUNUSED(enp)) } __checkReturn efx_rc_t -hunt_ev_qcreate( +ef10_ev_qcreate( __in efx_nic_t *enp, __in unsigned int index, __in efsys_mem_t *esmp, @@ -272,11 +272,11 @@ hunt_ev_qcreate( } /* Set up the handler table */ - eep->ee_rx = hunt_ev_rx; - eep->ee_tx = hunt_ev_tx; - eep->ee_driver = hunt_ev_driver; - eep->ee_drv_gen = hunt_ev_drv_gen; - eep->ee_mcdi = hunt_ev_mcdi; + eep->ee_rx = ef10_ev_rx; + eep->ee_tx = ef10_ev_tx; + eep->ee_driver = ef10_ev_driver; + eep->ee_drv_gen = ef10_ev_drv_gen; + eep->ee_mcdi = ef10_ev_mcdi; /* * Set up the event queue @@ -299,18 +299,19 @@ fail1: } void -hunt_ev_qdestroy( +ef10_ev_qdestroy( __in efx_evq_t *eep) { efx_nic_t *enp = eep->ee_enp; - EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON); + EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON || + enp->en_family == EFX_FAMILY_MEDFORD); (void) efx_mcdi_fini_evq(eep->ee_enp, eep->ee_index); } __checkReturn efx_rc_t -hunt_ev_qprime( +ef10_ev_qprime( __in efx_evq_t *eep, __in unsigned int count) { @@ -390,7 +391,7 @@ fail1: } void -hunt_ev_qpost( +ef10_ev_qpost( __in efx_evq_t *eep, __in uint16_t data) { @@ -406,7 +407,7 @@ hunt_ev_qpost( } __checkReturn efx_rc_t -hunt_ev_qmoderate( +ef10_ev_qmoderate( __in efx_evq_t *eep, __in unsigned int us) { @@ -463,14 +464,10 @@ fail1: #if EFSYS_OPT_QSTATS void -hunt_ev_qstats_update( +ef10_ev_qstats_update( __in efx_evq_t *eep, __inout_ecount(EV_NQSTATS) efsys_stat_t *stat) { - /* - * TBD: Consider a common Siena/Huntington function. The code is - * essentially identical. - */ unsigned int id; for (id = 0; id < EV_NQSTATS; id++) { @@ -484,7 +481,7 @@ hunt_ev_qstats_update( static __checkReturn boolean_t -hunt_ev_rx( +ef10_ev_rx( __in efx_evq_t *eep, __in efx_qword_t *eqp, __in const efx_ev_callbacks_t *eecp, @@ -691,7 +688,7 @@ hunt_ev_rx( } static __checkReturn boolean_t -hunt_ev_tx( +ef10_ev_tx( __in efx_evq_t *eep, __in efx_qword_t *eqp, __in const efx_ev_callbacks_t *eecp, @@ -726,7 +723,7 @@ hunt_ev_tx( } static __checkReturn boolean_t -hunt_ev_driver( +ef10_ev_driver( __in efx_evq_t *eep, __in efx_qword_t *eqp, __in const efx_ev_callbacks_t *eecp, @@ -776,7 +773,7 @@ hunt_ev_driver( } static __checkReturn boolean_t -hunt_ev_drv_gen( +ef10_ev_drv_gen( __in efx_evq_t *eep, __in efx_qword_t *eqp, __in const efx_ev_callbacks_t *eecp, @@ -804,7 +801,7 @@ hunt_ev_drv_gen( } static __checkReturn boolean_t -hunt_ev_mcdi( +ef10_ev_mcdi( __in efx_evq_t *eep, __in efx_qword_t *eqp, __in const efx_ev_callbacks_t *eecp, @@ -1000,7 +997,7 @@ hunt_ev_mcdi( } void -hunt_ev_rxlabel_init( +ef10_ev_rxlabel_init( __in efx_evq_t *eep, __in efx_rxq_t *erp, __in unsigned int label) @@ -1017,7 +1014,7 @@ hunt_ev_rxlabel_init( } void -hunt_ev_rxlabel_fini( +ef10_ev_rxlabel_fini( __in efx_evq_t *eep, __in unsigned int label) { Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h ============================================================================== --- stable/10/sys/dev/sfxge/common/hunt_impl.h Thu Jan 14 15:57:55 2016 (r293985) +++ stable/10/sys/dev/sfxge/common/hunt_impl.h Thu Jan 14 15:58:30 2016 (r293986) @@ -56,15 +56,15 @@ extern "C" { /* EV */ __checkReturn efx_rc_t -hunt_ev_init( +ef10_ev_init( __in efx_nic_t *enp); void -hunt_ev_fini( +ef10_ev_fini( __in efx_nic_t *enp); __checkReturn efx_rc_t -hunt_ev_qcreate( +ef10_ev_qcreate( __in efx_nic_t *enp, __in unsigned int index, __in efsys_mem_t *esmp, @@ -73,39 +73,39 @@ hunt_ev_qcreate( __in efx_evq_t *eep); void -hunt_ev_qdestroy( +ef10_ev_qdestroy( __in efx_evq_t *eep); __checkReturn efx_rc_t -hunt_ev_qprime( +ef10_ev_qprime( __in efx_evq_t *eep, __in unsigned int count); void -hunt_ev_qpost( +ef10_ev_qpost( __in efx_evq_t *eep, __in uint16_t data); __checkReturn efx_rc_t -hunt_ev_qmoderate( +ef10_ev_qmoderate( __in efx_evq_t *eep, __in unsigned int us); #if EFSYS_OPT_QSTATS void -hunt_ev_qstats_update( +ef10_ev_qstats_update( __in efx_evq_t *eep, __inout_ecount(EV_NQSTATS) efsys_stat_t *stat); #endif /* EFSYS_OPT_QSTATS */ void -hunt_ev_rxlabel_init( +ef10_ev_rxlabel_init( __in efx_evq_t *eep, __in efx_rxq_t *erp, __in unsigned int label); void -hunt_ev_rxlabel_fini( +ef10_ev_rxlabel_fini( __in efx_evq_t *eep, __in unsigned int label); Modified: stable/10/sys/dev/sfxge/common/hunt_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/hunt_rx.c Thu Jan 14 15:57:55 2016 (r293985) +++ stable/10/sys/dev/sfxge/common/hunt_rx.c Thu Jan 14 15:58:30 2016 (r293986) @@ -727,7 +727,7 @@ hunt_rx_qcreate( erp->er_eep = eep; erp->er_label = label; - hunt_ev_rxlabel_init(eep, erp, label); + ef10_ev_rxlabel_init(eep, erp, label); return (0); @@ -749,7 +749,7 @@ hunt_rx_qdestroy( efx_evq_t *eep = erp->er_eep; unsigned int label = erp->er_label; - hunt_ev_rxlabel_fini(eep, label); + ef10_ev_rxlabel_fini(eep, label); EFSYS_ASSERT(enp->en_rx_qcount != 0); --enp->en_rx_qcount;