diff options
author | jhb <jhb@FreeBSD.org> | 2016-12-03 01:10:45 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2016-12-03 01:10:45 +0000 |
commit | 8408238ce58163c0d88dea333c155b6806aae830 (patch) | |
tree | 6facee0f53405bc72c07273c692684dae6a46af3 | |
parent | eb2f26002dd766e9976cdbbb23a8eb7e7c1e82f8 (diff) | |
download | FreeBSD-src-8408238ce58163c0d88dea333c155b6806aae830.zip FreeBSD-src-8408238ce58163c0d88dea333c155b6806aae830.tar.gz |
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.
-rw-r--r-- | sys/dev/cxgbe/t4_main.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 31dd4653..e2a513a 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -7960,11 +7960,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; @@ -7998,6 +7993,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", |