Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Dec 2016 11:52:55 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r310811 - head/sys/dev/sfxge/common
Message-ID:  <201612301152.uBUBqtS2063544@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Fri Dec 30 11:52:55 2016
New Revision: 310811
URL: https://svnweb.freebsd.org/changeset/base/310811

Log:
  sfxge(4): cleanup: remove now-unused function flags
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days
  Differential Revision:  https://reviews.freebsd.org/D8966

Modified:
  head/sys/dev/sfxge/common/efx.h
  head/sys/dev/sfxge/common/efx_mcdi.c

Modified: head/sys/dev/sfxge/common/efx.h
==============================================================================
--- head/sys/dev/sfxge/common/efx.h	Fri Dec 30 11:49:37 2016	(r310810)
+++ head/sys/dev/sfxge/common/efx.h	Fri Dec 30 11:52:55 2016	(r310811)
@@ -128,11 +128,6 @@ typedef struct efx_rxq_s	efx_rxq_t;
 
 typedef struct efx_nic_s	efx_nic_t;
 
-#define	EFX_NIC_FUNC_PRIMARY	0x00000001
-#define	EFX_NIC_FUNC_LINKCTRL	0x00000002
-#define	EFX_NIC_FUNC_TRUSTED	0x00000004
-
-
 extern	__checkReturn	efx_rc_t
 efx_nic_create(
 	__in		efx_family_t family,
@@ -1100,7 +1095,6 @@ typedef struct efx_nic_cfg_s {
 	unsigned int		enc_features;
 	uint8_t			enc_mac_addr[6];
 	uint8_t			enc_port;	/* PHY port number */
-	uint32_t		enc_func_flags;
 	uint32_t		enc_intr_vec_base;
 	uint32_t		enc_intr_limit;
 	uint32_t		enc_evq_limit;

Modified: head/sys/dev/sfxge/common/efx_mcdi.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_mcdi.c	Fri Dec 30 11:49:37 2016	(r310810)
+++ head/sys/dev/sfxge/common/efx_mcdi.c	Fri Dec 30 11:52:55 2016	(r310811)
@@ -1184,11 +1184,9 @@ efx_mcdi_drv_attach(
 	__in		efx_nic_t *enp,
 	__in		boolean_t attach)
 {
-	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
 	efx_mcdi_req_t req;
 	uint8_t payload[MAX(MC_CMD_DRV_ATTACH_IN_LEN,
 			    MC_CMD_DRV_ATTACH_EXT_OUT_LEN)];
-	uint32_t flags;
 	efx_rc_t rc;
 
 	(void) memset(payload, 0, sizeof (payload));
@@ -1219,36 +1217,8 @@ efx_mcdi_drv_attach(
 		goto fail2;
 	}
 
-	if (attach == B_FALSE) {
-		flags = 0;
-	} else if (enp->en_family == EFX_FAMILY_SIENA) {
-		efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
-
-		/* Create synthetic privileges for Siena functions */
-		flags = EFX_NIC_FUNC_LINKCTRL | EFX_NIC_FUNC_TRUSTED;
-		if (emip->emi_port == 1)
-			flags |= EFX_NIC_FUNC_PRIMARY;
-	} else {
-		EFX_STATIC_ASSERT(EFX_NIC_FUNC_PRIMARY ==
-		    (1u << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_PRIMARY));
-		EFX_STATIC_ASSERT(EFX_NIC_FUNC_LINKCTRL ==
-		    (1u << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL));
-		EFX_STATIC_ASSERT(EFX_NIC_FUNC_TRUSTED ==
-		    (1u << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED));
-
-		/* Save function privilege flags (EF10 and later) */
-		if (req.emr_out_length_used < MC_CMD_DRV_ATTACH_EXT_OUT_LEN) {
-			rc = EMSGSIZE;
-			goto fail3;
-		}
-		flags = MCDI_OUT_DWORD(req, DRV_ATTACH_EXT_OUT_FUNC_FLAGS);
-	}
-	encp->enc_func_flags = flags;
-
 	return (0);
 
-fail3:
-	EFSYS_PROBE(fail3);
 fail2:
 	EFSYS_PROBE(fail2);
 fail1:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612301152.uBUBqtS2063544>