svn commit: r293985 - stable/10/sys/dev/sfxge/common

Andrew Rybchenko arybchik at FreeBSD.org
Thu Jan 14 15:57:57 UTC 2016


Author: arybchik
Date: Thu Jan 14 15:57:55 2016
New Revision: 293985
URL: https://svnweb.freebsd.org/changeset/base/293985

Log:
  MFC r293751
  
  sfxge: rename hunt interrupt methods to ef10 and use on Medford
  
  All of these apply to both Huntington and Medford.
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/common/efx_intr.c
  stable/10/sys/dev/sfxge/common/hunt_impl.h
  stable/10/sys/dev/sfxge/common/hunt_intr.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/efx_intr.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_intr.c	Thu Jan 14 15:56:53 2016	(r293984)
+++ stable/10/sys/dev/sfxge/common/efx_intr.c	Thu Jan 14 15:57:55 2016	(r293985)
@@ -101,17 +101,16 @@ static efx_intr_ops_t	__efx_intr_siena_o
 };
 #endif	/* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON
-static efx_intr_ops_t	__efx_intr_hunt_ops = {
-	hunt_intr_init,			/* eio_init */
-	hunt_intr_enable,		/* eio_enable */
-	hunt_intr_disable,		/* eio_disable */
-	hunt_intr_disable_unlocked,	/* eio_disable_unlocked */
-	hunt_intr_trigger,		/* eio_trigger */
-	hunt_intr_fini,			/* eio_fini */
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
+static efx_intr_ops_t	__efx_intr_ef10_ops = {
+	ef10_intr_init,			/* eio_init */
+	ef10_intr_enable,		/* eio_enable */
+	ef10_intr_disable,		/* eio_disable */
+	ef10_intr_disable_unlocked,	/* eio_disable_unlocked */
+	ef10_intr_trigger,		/* eio_trigger */
+	ef10_intr_fini,			/* eio_fini */
 };
-#endif	/* EFSYS_OPT_HUNTINGTON */
-
+#endif	/* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
 	__checkReturn	efx_rc_t
 efx_intr_init(
@@ -152,10 +151,16 @@ efx_intr_init(
 
 #if EFSYS_OPT_HUNTINGTON
 	case EFX_FAMILY_HUNTINGTON:
-		eiop = (efx_intr_ops_t *)&__efx_intr_hunt_ops;
+		eiop = (efx_intr_ops_t *)&__efx_intr_ef10_ops;
 		break;
 #endif	/* EFSYS_OPT_HUNTINGTON */
 
+#if EFSYS_OPT_MEDFORD
+	case EFX_FAMILY_MEDFORD:
+		eiop = (efx_intr_ops_t *)&__efx_intr_ef10_ops;
+		break;
+#endif	/* EFSYS_OPT_MEDFORD */
+
 	default:
 		EFSYS_ASSERT(B_FALSE);
 		rc = ENOTSUP;

Modified: stable/10/sys/dev/sfxge/common/hunt_impl.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_impl.h	Thu Jan 14 15:56:53 2016	(r293984)
+++ stable/10/sys/dev/sfxge/common/hunt_impl.h	Thu Jan 14 15:57:55 2016	(r293985)
@@ -112,30 +112,30 @@ hunt_ev_rxlabel_fini(
 /* INTR */
 
 	__checkReturn	efx_rc_t
-hunt_intr_init(
+ef10_intr_init(
 	__in		efx_nic_t *enp,
 	__in		efx_intr_type_t type,
 	__in		efsys_mem_t *esmp);
 
 			void
-hunt_intr_enable(
+ef10_intr_enable(
 	__in		efx_nic_t *enp);
 
 			void
-hunt_intr_disable(
+ef10_intr_disable(
 	__in		efx_nic_t *enp);
 
 			void
-hunt_intr_disable_unlocked(
+ef10_intr_disable_unlocked(
 	__in		efx_nic_t *enp);
 
 	__checkReturn	efx_rc_t
-hunt_intr_trigger(
+ef10_intr_trigger(
 	__in		efx_nic_t *enp,
 	__in		unsigned int level);
 
 			void
-hunt_intr_fini(
+ef10_intr_fini(
 	__in		efx_nic_t *enp);
 
 /* NIC */

Modified: stable/10/sys/dev/sfxge/common/hunt_intr.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/hunt_intr.c	Thu Jan 14 15:56:53 2016	(r293984)
+++ stable/10/sys/dev/sfxge/common/hunt_intr.c	Thu Jan 14 15:57:55 2016	(r293985)
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
 #if EFSYS_OPT_HUNTINGTON
 
 	__checkReturn	efx_rc_t
-hunt_intr_init(
+ef10_intr_init(
 	__in		efx_nic_t *enp,
 	__in		efx_intr_type_t type,
 	__in		efsys_mem_t *esmp)
@@ -50,7 +50,7 @@ hunt_intr_init(
 
 
 			void
-hunt_intr_enable(
+ef10_intr_enable(
 	__in		efx_nic_t *enp)
 {
 	_NOTE(ARGUNUSED(enp))
@@ -58,7 +58,7 @@ hunt_intr_enable(
 
 
 			void
-hunt_intr_disable(
+ef10_intr_disable(
 	__in		efx_nic_t *enp)
 {
 	_NOTE(ARGUNUSED(enp))
@@ -66,7 +66,7 @@ hunt_intr_disable(
 
 
 			void
-hunt_intr_disable_unlocked(
+ef10_intr_disable_unlocked(
 	__in		efx_nic_t *enp)
 {
 	_NOTE(ARGUNUSED(enp))
@@ -83,7 +83,8 @@ efx_mcdi_trigger_interrupt(
 			    MC_CMD_TRIGGER_INTERRUPT_OUT_LEN)];
 	efx_rc_t rc;
 
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
+	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
+		    enp->en_family == EFX_FAMILY_MEDFORD);
 
 	if (level >= enp->en_nic_cfg.enc_intr_limit) {
 		rc = EINVAL;
@@ -118,7 +119,7 @@ fail1:
 }
 
 	__checkReturn	efx_rc_t
-hunt_intr_trigger(
+ef10_intr_trigger(
 	__in		efx_nic_t *enp,
 	__in		unsigned int level)
 {
@@ -126,7 +127,10 @@ hunt_intr_trigger(
 	efx_rc_t rc;
 
 	if (encp->enc_bug41750_workaround) {
-		/* bug 41750: Test interrupts don't work on Greenport */
+		/*
+		 * bug 41750: Test interrupts don't work on Greenport
+		 * bug 50084: Test interrupts don't work on VFs
+		 */
 		rc = ENOTSUP;
 		goto fail1;
 	}
@@ -146,7 +150,7 @@ fail1:
 
 
 			void
-hunt_intr_fini(
+ef10_intr_fini(
 	__in		efx_nic_t *enp)
 {
 	_NOTE(ARGUNUSED(enp))


More information about the svn-src-all mailing list