Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jul 2016 23:29:37 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r303348 - head/sys/dev/cxgbe
Message-ID:  <201607262329.u6QNTbkp015086@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Tue Jul 26 23:29:37 2016
New Revision: 303348
URL: https://svnweb.freebsd.org/changeset/base/303348

Log:
  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:
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c	Tue Jul 26 23:27:28 2016	(r303347)
+++ head/sys/dev/cxgbe/t4_main.c	Tue Jul 26 23:29:37 2016	(r303348)
@@ -7909,11 +7909,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;
@@ -7947,6 +7942,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?201607262329.u6QNTbkp015086>