-/* $OpenBSD: dwc2.c,v 1.65 2022/09/05 20:11:44 mglocker Exp $ */
+/* $OpenBSD: dwc2.c,v 1.66 2022/09/09 21:16:54 mglocker Exp $ */
/* $NetBSD: dwc2.c,v 1.32 2014/09/02 23:26:20 macallan Exp $ */
/*-
DPRINTFN(10, "\n");
DWC2_EVCNT_INCR(sc->sc_ev_xferpoolget);
- dxfer = pool_get(&sc->sc_xferpool, PR_WAITOK);
+ dxfer = pool_get(&sc->sc_xferpool, PR_NOWAIT | PR_ZERO);
if (dxfer != NULL) {
- memset(dxfer, 0, sizeof(*dxfer));
dxfer->urb = dwc2_hcd_urb_alloc(sc->sc_hsotg,
DWC2_MAXISOCPACKETS, M_NOWAIT);
#ifdef DIAGNOSTIC
qh_allocated = true;
}
- qtd = pool_get(&sc->sc_qtdpool, PR_NOWAIT);
+ qtd = pool_get(&sc->sc_qtdpool, PR_NOWAIT | PR_ZERO);
if (!qtd) {
retval = -ENOMEM;
goto fail1;
}
- memset(qtd, 0, sizeof(*qtd));
/* might need to check cpu_intr_p */
mtx_enter(&hsotg->lock);
-/* $OpenBSD: dwc2_hcd.c,v 1.27 2022/09/04 08:42:40 mglocker Exp $ */
+/* $OpenBSD: dwc2_hcd.c,v 1.28 2022/09/09 21:16:54 mglocker Exp $ */
/* $NetBSD: dwc2_hcd.c,v 1.15 2014/11/24 10:14:14 skrll Exp $ */
/*
if (!qtd)
return -EINVAL;
- memset(qtd, 0, sizeof(*qtd)); /* Required for OpenBSD */
-
dwc2_hcd_qtd_init(qtd, urb);
retval = dwc2_hcd_qtd_add(hsotg, qtd, qh);
if (retval) {
-/* $OpenBSD: dwc2_hcdqueue.c,v 1.14 2022/09/08 18:16:26 mglocker Exp $ */
+/* $OpenBSD: dwc2_hcdqueue.c,v 1.15 2022/09/09 21:16:54 mglocker Exp $ */
/* $NetBSD: dwc2_hcdqueue.c,v 1.11 2014/09/03 10:00:08 skrll Exp $ */
/*
return NULL;
/* Allocate memory */
- qh = pool_get(&sc->sc_qhpool, PR_ZERO | PR_NOWAIT);
+ qh = pool_get(&sc->sc_qhpool, PR_NOWAIT | PR_ZERO);
if (!qh)
return NULL;