From 17146cd5433eeb0e375fffcce8d57a44a6c345d7 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Tue, 26 Jul 2016 23:29:37 +0000 Subject: [PATCH] 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. --- sys/dev/cxgbe/t4_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 773d50ac033b..47748074b7d6 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -7909,11 +7909,6 @@ set_filter(struct adapter *sc, struct t4_filter *t) 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_filter *t) 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",