diff --git a/sys/net/iflib.c b/sys/net/iflib.c index f25d2635384..e2b142cba93 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -1441,15 +1441,17 @@ _iflib_irq_alloc(if_ctx_t ctx, if_irq_t irq, int rid, driver_filter_t filter, driver_intr_t handler, void *arg, char *name) { - int rc; + int rc, flags; struct resource *res; - void *tag; + void *tag = NULL; device_t dev = ctx->ifc_dev; + flags = RF_ACTIVE; + if (ctx->ifc_flags & IFC_LEGACY) + flags |= RF_SHAREABLE; MPASS(rid < 512); irq->ii_rid = rid; - res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &irq->ii_rid, - RF_SHAREABLE | RF_ACTIVE); + res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &irq->ii_rid, flags); if (res == NULL) { device_printf(dev, "failed to allocate IRQ for rid %d, name %s.\n", rid, name); @@ -2122,7 +2124,8 @@ hung: ctx->ifc_watchdog_events++; ctx->ifc_pause_frames = 0; - iflib_init_locked(ctx); + ctx->ifc_flags |= IFC_DO_RESET; + iflib_admin_intr_deferred(ctx); CTX_UNLOCK(ctx); } @@ -2600,7 +2603,7 @@ txq_max_rs_deferred(iflib_txq_t txq) return (notify_count >> 1); if (txq->ift_in_use > minthresh) return (notify_count >> 2); - return (notify_count >> 4); + return (2); } #define M_CSUM_FLAGS(m) ((m)->m_pkthdr.csum_flags)