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:
wlf 2014-07-16 14:09:10 +08:00
parent dfdb9c2af8
commit 6d10fa81b3

View File

@ -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);
/*