svn commit: r311096 - stable/10/sys/dev/sfxge

Andrew Rybchenko arybchik at FreeBSD.org
Mon Jan 2 09:50:53 UTC 2017


Author: arybchik
Date: Mon Jan  2 09:50:51 2017
New Revision: 311096
URL: https://svnweb.freebsd.org/changeset/base/311096

Log:
  MFC r310820
  
  sfxge(4): move queue size checks to after the NIC config has been populated
  
  Submitted by:   Mark Spender <mspender at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.

Modified:
  stable/10/sys/dev/sfxge/sfxge.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/sfxge.c
==============================================================================
--- stable/10/sys/dev/sfxge/sfxge.c	Mon Jan  2 09:49:40 2017	(r311095)
+++ stable/10/sys/dev/sfxge/sfxge.c	Mon Jan  2 09:50:51 2017	(r311096)
@@ -739,6 +739,16 @@ sfxge_create(struct sfxge_softc *sc)
 		goto fail3;
 	sc->enp = enp;
 
+	/* Initialize MCDI to talk to the microcontroller. */
+	DBGPRINT(sc->dev, "mcdi_init...");
+	if ((error = sfxge_mcdi_init(sc)) != 0)
+		goto fail4;
+
+	/* Probe the NIC and build the configuration data area. */
+	DBGPRINT(sc->dev, "nic_probe...");
+	if ((error = efx_nic_probe(enp)) != 0)
+		goto fail5;
+
 	if (!ISP2(sfxge_rx_ring_entries) ||
 	    (sfxge_rx_ring_entries < EFX_RXQ_MINNDESCS) ||
 	    (sfxge_rx_ring_entries > EFX_RXQ_MAXNDESCS)) {
@@ -761,16 +771,6 @@ sfxge_create(struct sfxge_softc *sc)
 	}
 	sc->txq_entries = sfxge_tx_ring_entries;
 
-	/* Initialize MCDI to talk to the microcontroller. */
-	DBGPRINT(sc->dev, "mcdi_init...");
-	if ((error = sfxge_mcdi_init(sc)) != 0)
-		goto fail4;
-
-	/* Probe the NIC and build the configuration data area. */
-	DBGPRINT(sc->dev, "nic_probe...");
-	if ((error = efx_nic_probe(enp)) != 0)
-		goto fail5;
-
 	SYSCTL_ADD_STRING(device_get_sysctl_ctx(dev),
 			  SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
 			  OID_AUTO, "version", CTLFLAG_RD,
@@ -863,14 +863,14 @@ fail7:
 	efx_nvram_fini(enp);
 
 fail6:
+fail_tx_ring_entries:
+fail_rx_ring_entries:
 	efx_nic_unprobe(enp);
 
 fail5:
 	sfxge_mcdi_fini(sc);
 
 fail4:
-fail_tx_ring_entries:
-fail_rx_ring_entries:
 	sc->enp = NULL;
 	efx_nic_destroy(enp);
 	SFXGE_EFSYS_LOCK_DESTROY(&sc->enp_lock);


More information about the svn-src-stable mailing list