svn commit: r299729 - head/sys/dev/sfxge/common

Andrew Rybchenko arybchik at FreeBSD.org
Sat May 14 06:14:30 UTC 2016


Author: arybchik
Date: Sat May 14 06:14:28 2016
New Revision: 299729
URL: https://svnweb.freebsd.org/changeset/base/299729

Log:
  sfxge(4): remove unimplemented MAC reset method
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      1 week

Modified:
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/efx_mac.c
  head/sys/dev/sfxge/common/efx_nic.c

Modified: head/sys/dev/sfxge/common/efx_impl.h
==============================================================================
--- head/sys/dev/sfxge/common/efx_impl.h	Sat May 14 06:13:24 2016	(r299728)
+++ head/sys/dev/sfxge/common/efx_impl.h	Sat May 14 06:14:28 2016	(r299729)
@@ -78,10 +78,9 @@ extern "C" {
 #define	EFX_MOD_FILTER		0x00001000
 #define	EFX_MOD_LIC		0x00002000
 
-#define	EFX_RESET_MAC		0x00000001
-#define	EFX_RESET_PHY		0x00000002
-#define	EFX_RESET_RXQ_ERR	0x00000004
-#define	EFX_RESET_TXQ_ERR	0x00000008
+#define	EFX_RESET_PHY		0x00000001
+#define	EFX_RESET_RXQ_ERR	0x00000002
+#define	EFX_RESET_TXQ_ERR	0x00000004
 
 typedef enum efx_mac_type_e {
 	EFX_MAC_INVALID = 0,
@@ -180,7 +179,6 @@ typedef struct efx_rx_ops_s {
 } efx_rx_ops_t;
 
 typedef struct efx_mac_ops_s {
-	efx_rc_t	(*emo_reset)(efx_nic_t *); /* optional */
 	efx_rc_t	(*emo_poll)(efx_nic_t *, efx_link_mode_t *);
 	efx_rc_t	(*emo_up)(efx_nic_t *, boolean_t *);
 	efx_rc_t	(*emo_addr_set)(efx_nic_t *);

Modified: head/sys/dev/sfxge/common/efx_mac.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_mac.c	Sat May 14 06:13:24 2016	(r299728)
+++ head/sys/dev/sfxge/common/efx_mac.c	Sat May 14 06:14:28 2016	(r299729)
@@ -44,7 +44,6 @@ siena_mac_multicast_list_set(
 
 #if EFSYS_OPT_SIENA
 static const efx_mac_ops_t	__efx_siena_mac_ops = {
-	NULL,					/* emo_reset */
 	siena_mac_poll,				/* emo_poll */
 	siena_mac_up,				/* emo_up */
 	siena_mac_reconfigure,			/* emo_addr_set */
@@ -66,7 +65,6 @@ static const efx_mac_ops_t	__efx_siena_m
 
 #if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
 static const efx_mac_ops_t	__efx_ef10_mac_ops = {
-	NULL,					/* emo_reset */
 	ef10_mac_poll,				/* emo_poll */
 	ef10_mac_up,				/* emo_up */
 	ef10_mac_addr_set,			/* emo_addr_set */
@@ -240,21 +238,11 @@ efx_mac_drain(
 
 	epp->ep_mac_drain = enabled;
 
-	if (enabled && emop->emo_reset != NULL) {
-		if ((rc = emop->emo_reset(enp)) != 0)
-			goto fail1;
-
-		EFSYS_ASSERT(enp->en_reset_flags & EFX_RESET_MAC);
-		enp->en_reset_flags &= ~EFX_RESET_PHY;
-	}
-
 	if ((rc = emop->emo_reconfigure(enp)) != 0)
-		goto fail2;
+		goto fail1;
 
 	return (0);
 
-fail2:
-	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 
@@ -739,18 +727,8 @@ efx_mac_select(
 	epp->ep_emop = emop;
 	epp->ep_mac_type = type;
 
-	if (emop->emo_reset != NULL) {
-		if ((rc = emop->emo_reset(enp)) != 0)
-			goto fail2;
-
-		EFSYS_ASSERT(enp->en_reset_flags & EFX_RESET_MAC);
-		enp->en_reset_flags &= ~EFX_RESET_MAC;
-	}
-
 	return (0);
 
-fail2:
-	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 

Modified: head/sys/dev/sfxge/common/efx_nic.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_nic.c	Sat May 14 06:13:24 2016	(r299728)
+++ head/sys/dev/sfxge/common/efx_nic.c	Sat May 14 06:14:28 2016	(r299729)
@@ -599,8 +599,6 @@ efx_nic_reset(
 	if ((rc = enop->eno_reset(enp)) != 0)
 		goto fail2;
 
-	enp->en_reset_flags |= EFX_RESET_MAC;
-
 	return (0);
 
 fail2:


More information about the svn-src-all mailing list