svn commit: r303348 - head/sys/dev/cxgbe
Navdeep Parhar
np at FreeBSD.org
Tue Jul 26 23:29:38 UTC 2016
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",
More information about the svn-src-head
mailing list