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",
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to