Index: sys/dev/usb/ehci.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/ehci.c,v retrieving revision 1.273 diff -u -p -r1.273 ehci.c --- sys/dev/usb/ehci.c 15 Feb 2020 01:21:56 -0000 1.273 +++ sys/dev/usb/ehci.c 20 Feb 2020 18:33:10 -0000 @@ -3748,7 +3748,7 @@ Static void ehci_device_ctrl_close(struct usbd_pipe *pipe) { ehci_softc_t *sc = EHCI_PIPE2SC(pipe); - /*struct ehci_pipe *epipe = EHCI_PIPE2EPIPE(pipe);*/ + struct ehci_pipe * const epipe = EHCI_PIPE2EPIPE(pipe); EHCIHIST_FUNC(); EHCIHIST_CALLED(); @@ -3757,6 +3757,8 @@ ehci_device_ctrl_close(struct usbd_pipe DPRINTF("pipe=%#jx", (uintptr_t)pipe, 0, 0, 0); ehci_close_pipe(pipe, sc->sc_async_head); + + usb_freemem(&sc->sc_bus, &epipe->ctrl.reqdma); } /* Index: sys/dev/usb/ohci.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/ohci.c,v retrieving revision 1.295 diff -u -p -r1.295 ohci.c --- sys/dev/usb/ohci.c 15 Feb 2020 01:21:56 -0000 1.295 +++ sys/dev/usb/ohci.c 20 Feb 2020 18:33:11 -0000 @@ -2841,6 +2841,8 @@ ohci_device_ctrl_close(struct usbd_pipe DPRINTF("pipe=%#jx", (uintptr_t)pipe, 0, 0, 0); ohci_close_pipe(pipe, sc->sc_ctrl_head); ohci_free_std_locked(sc, opipe->tail.td); + + usb_freemem(&sc->sc_bus, &opipe->ctrl.reqdma); } /************************/ Index: sys/dev/usb/uhci.c =================================================================== RCS file: /cvsroot/src/sys/dev/usb/uhci.c,v retrieving revision 1.293 diff -u -p -r1.293 uhci.c --- sys/dev/usb/uhci.c 15 Feb 2020 01:21:56 -0000 1.293 +++ sys/dev/usb/uhci.c 20 Feb 2020 18:33:11 -0000 @@ -2807,6 +2807,7 @@ uhci_device_ctrl_close(struct usbd_pipe uhci_free_std_locked(sc, upipe->ctrl.setup); uhci_free_std_locked(sc, upipe->ctrl.stat); + usb_freemem(&sc->sc_bus, &upipe->ctrl.reqdma); } /* Abort a device interrupt request. */ Index: sys/external/bsd/dwc2/dwc2.c =================================================================== RCS file: /cvsroot/src/sys/external/bsd/dwc2/dwc2.c,v retrieving revision 1.71 diff -u -p -r1.71 dwc2.c --- sys/external/bsd/dwc2/dwc2.c 15 Feb 2020 14:05:06 -0000 1.71 +++ sys/external/bsd/dwc2/dwc2.c 20 Feb 2020 18:33:11 -0000 @@ -764,9 +764,13 @@ dwc2_device_ctrl_abort(struct usbd_xfer Static void dwc2_device_ctrl_close(struct usbd_pipe *pipe) { + struct dwc2_softc * const sc = DWC2_PIPE2SC(pipe); + struct dwc2_pipe * const dpipe = DWC2_PIPE2DPIPE(pipe); DPRINTF("pipe=%p\n", pipe); dwc2_close_pipe(pipe); + + usb_freemem(&sc->sc_bus, &dpipe->req_dma); } Static void Index: sys/arch/mips/adm5120/dev/ahci.c =================================================================== RCS file: /cvsroot/src/sys/arch/mips/adm5120/dev/ahci.c,v retrieving revision 1.20 diff -u -p -r1.20 ahci.c --- sys/arch/mips/adm5120/dev/ahci.c 15 Feb 2020 01:21:56 -0000 1.20 +++ sys/arch/mips/adm5120/dev/ahci.c 20 Feb 2020 18:33:11 -0000 @@ -989,6 +989,9 @@ ahci_device_ctrl_start(struct usbd_xfer usb_transfer_complete(xfer); mutex_exit(&sc->sc_lock); + + usb_freemem(&sc->sc_bus, &reqdma); + return USBD_NORMAL_COMPLETION; }