From 04bd9a165abe1190497010c1b9ce4f9f4c06d8ea Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Tue, 10 May 2016 07:42:18 +0000 Subject: [PATCH] sfxge(4): cleanup: remove unused efx_infer_family() Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week --- sys/dev/sfxge/common/efx.h | 4 --- sys/dev/sfxge/common/efx_nic.c | 53 ---------------------------------- 2 files changed, 57 deletions(-) diff --git a/sys/dev/sfxge/common/efx.h b/sys/dev/sfxge/common/efx.h index af7f15b69c5..667bb723a5f 100644 --- a/sys/dev/sfxge/common/efx.h +++ b/sys/dev/sfxge/common/efx.h @@ -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 diff --git a/sys/dev/sfxge/common/efx_nic.c b/sys/dev/sfxge/common/efx_nic.c index 32a1f9eac04..285f8a1651f 100644 --- a/sys/dev/sfxge/common/efx_nic.c +++ b/sys/dev/sfxge/common/efx_nic.c @@ -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