From owner-svn-src-all@freebsd.org Sat Jun 4 14:44:05 2016 Return-Path: Delivered-To: svn-src-all@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 CBE7DB6A860; Sat, 4 Jun 2016 14:44:05 +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 8519C181F; Sat, 4 Jun 2016 14:44:05 +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 u54Ei4jn096127; Sat, 4 Jun 2016 14:44:04 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u54Ei4BQ096125; Sat, 4 Jun 2016 14:44:04 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201606041444.u54Ei4BQ096125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 4 Jun 2016 14:44:04 +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: r301328 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jun 2016 14:44:05 -0000 Author: arybchik Date: Sat Jun 4 14:44:04 2016 New Revision: 301328 URL: https://svnweb.freebsd.org/changeset/base/301328 Log: MFC r299340 sfxge(4): cleanup: remove unused efx_infer_family() Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_nic.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:42:36 2016 (r301327) +++ stable/10/sys/dev/sfxge/common/efx.h Sat Jun 4 14:44:04 2016 (r301328) @@ -72,10 +72,6 @@ efx_family( __in uint16_t devid, __out efx_family_t *efp); -extern __checkReturn efx_rc_t -efx_infer_family( - __in efsys_bar_t *esbp, - __out efx_family_t *efp); #define EFX_PCI_VENID_SFC 0x1924 Modified: stable/10/sys/dev/sfxge/common/efx_nic.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_nic.c Sat Jun 4 14:42:36 2016 (r301327) +++ stable/10/sys/dev/sfxge/common/efx_nic.c Sat Jun 4 14:44:04 2016 (r301328) @@ -105,59 +105,6 @@ efx_family( return (ENOTSUP); } -/* - * To support clients which aren't provided with any PCI context infer - * the hardware family by inspecting the hardware. Obviously the caller - * must be damn sure they're really talking to a supported device. - */ - __checkReturn efx_rc_t -efx_infer_family( - __in efsys_bar_t *esbp, - __out efx_family_t *efp) -{ - efx_family_t family; - efx_oword_t oword; - unsigned int portnum; - efx_rc_t rc; - - EFSYS_BAR_READO(esbp, FR_AZ_CS_DEBUG_REG_OFST, &oword, B_TRUE); - portnum = EFX_OWORD_FIELD(oword, FRF_CZ_CS_PORT_NUM); - if ((portnum == 1) || (portnum == 2)) { -#if EFSYS_OPT_SIENA - family = EFX_FAMILY_SIENA; - goto out; -#endif - } else if (portnum == 0) { - efx_dword_t dword; - uint32_t hw_rev; - - EFSYS_BAR_READD(esbp, ER_DZ_BIU_HW_REV_ID_REG_OFST, &dword, - B_TRUE); - hw_rev = EFX_DWORD_FIELD(dword, ERF_DZ_HW_REV_ID); - if (hw_rev == ER_DZ_BIU_HW_REV_ID_REG_RESET) { -#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD - /* - * BIU_HW_REV_ID is the same for Huntington and Medford. - * Assume Huntington, as Medford is very similar. - */ - family = EFX_FAMILY_HUNTINGTON; - goto out; -#endif - } - } - rc = ENOTSUP; - goto fail1; - -out: - if (efp != NULL) - *efp = family; - return (0); - -fail1: - EFSYS_PROBE1(fail1, efx_rc_t, rc); - - return (rc); -} #define EFX_BIU_MAGIC0 0x01234567 #define EFX_BIU_MAGIC1 0xfedcba98