mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
USB: fix otg pcd DMA allocate memory with GFP_ATOMIC.
In dwc_otg_pcd_ep_queue, allocate DMA memory for align buf. Because dwc_otg_pcd_ep_queue can be called in irq, so it must be used GFP_ATOMIC to avoid sleep in irq.
This commit is contained in:
parent
dfdb9c2af8
commit
6d10fa81b3
|
|
@ -2144,8 +2144,8 @@ int dwc_otg_pcd_ep_queue(dwc_otg_pcd_t *pcd, void *ep_handle,
|
|||
req->dw_align_buf = NULL;
|
||||
if ((dma_buf & 0x3) && GET_CORE_IF(pcd)->dma_enable
|
||||
&& !GET_CORE_IF(pcd)->dma_desc_enable)
|
||||
req->dw_align_buf = DWC_DMA_ALLOC(buflen,
|
||||
&req->dw_align_buf_dma);
|
||||
req->dw_align_buf = DWC_DMA_ALLOC_ATOMIC(buflen,
|
||||
&req->dw_align_buf_dma);
|
||||
DWC_SPINLOCK_IRQSAVE(pcd->lock, &flags);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user