Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Dec 2016 01:10:45 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r309459 - in stable: 10/sys/dev/cxgbe 11/sys/dev/cxgbe
Message-ID:  <201612030110.uB31AjkJ021340@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Sat Dec  3 01:10:45 2016
New Revision: 309459
URL: https://svnweb.freebsd.org/changeset/base/309459

Log:
  MFC 303348:
  cxgbe(4): Initialize the adapter queues (fwq and mgmtq) instead of
  returning EAGAIN if they aren't available when the user tries to program
  a filter.  Do this after validating the filter so that the driver
  doesn't bring up the queues if it doesn't have to.

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

Changes in other areas also in this revision:
Modified:
  stable/11/sys/dev/cxgbe/t4_main.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/10/sys/dev/cxgbe/t4_main.c	Sat Dec  3 01:04:59 2016	(r309458)
+++ stable/10/sys/dev/cxgbe/t4_main.c	Sat Dec  3 01:10:45 2016	(r309459)
@@ -7818,11 +7818,6 @@ set_filter(struct adapter *sc, struct t4
 		goto done;
 	}
 
-	if (!(sc->flags & FULL_INIT_DONE)) {
-		rc = EAGAIN;
-		goto done;
-	}
-
 	if (t->idx >= nfilters) {
 		rc = EINVAL;
 		goto done;
@@ -7856,6 +7851,10 @@ set_filter(struct adapter *sc, struct t4
 		goto done;
 	}
 
+	if (!(sc->flags & FULL_INIT_DONE) &&
+	    ((rc = adapter_full_init(sc)) != 0))
+		goto done;
+
 	if (sc->tids.ftid_tab == NULL) {
 		KASSERT(sc->tids.ftids_in_use == 0,
 		    ("%s: no memory allocated but filters_in_use > 0",



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