mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 09:43:59 +08:00
usb: chipidea: udc: free pending TD at removal procedure
There is a pending TD which is not freed after request finishes, we do this due to a controller bug. This TD needs to be freed when the driver is removed. It prints below error message when unload chipidea driver at current code: "ci_hdrc ci_hdrc.0: dma_pool_destroy ci_hw_td, b0001000 busy" It indicates the buffer at dma pool are still in use. This commit will free the pending TD at driver's removal procedure, it can fix the problem described above. Acked-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3a254fea70
commit
e7ef5265b1
@ -1600,6 +1600,8 @@ static void destroy_eps(struct ci_hdrc *ci)
|
||||
for (i = 0; i < ci->hw_ep_max; i++) {
|
||||
struct ci_hw_ep *hwep = &ci->ci_hw_ep[i];
|
||||
|
||||
if (hwep->pending_td)
|
||||
free_pending_td(hwep);
|
||||
dma_pool_free(ci->qh_pool, hwep->qh.ptr, hwep->qh.dma);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user