From 531563a29f2595674b464c3a6b5931b1aa7b8804 Mon Sep 17 00:00:00 2001 From: wlf Date: Wed, 16 Jul 2014 18:06:43 +0800 Subject: [PATCH] USB: fix dwc_otg hcd desc dma allocate memory with GFP_ATOMIC. --- drivers/usb/dwc_otg_310/dwc_otg_hcd_ddma.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc_otg_310/dwc_otg_hcd_ddma.c b/drivers/usb/dwc_otg_310/dwc_otg_hcd_ddma.c index 6d70577aff47..3169aa272c0c 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_hcd_ddma.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_hcd_ddma.c @@ -83,8 +83,8 @@ static int desc_list_alloc(dwc_otg_qh_t *qh) int retval = 0; qh->desc_list = (dwc_otg_host_dma_desc_t *) - DWC_DMA_ALLOC(sizeof(dwc_otg_host_dma_desc_t) * max_desc_num(qh), - &qh->desc_list_dma); + DWC_DMA_ALLOC_ATOMIC(sizeof(dwc_otg_host_dma_desc_t) * max_desc_num(qh), + &qh->desc_list_dma); if (!qh->desc_list) { retval = -DWC_E_NO_MEMORY; @@ -97,7 +97,7 @@ static int desc_list_alloc(dwc_otg_qh_t *qh) sizeof(dwc_otg_host_dma_desc_t) * max_desc_num(qh)); qh->n_bytes = - (uint32_t *) DWC_ALLOC(sizeof(uint32_t) * max_desc_num(qh)); + (uint32_t *) DWC_ALLOC_ATOMIC(sizeof(uint32_t) * max_desc_num(qh)); if (!qh->n_bytes) { retval = -DWC_E_NO_MEMORY; @@ -130,8 +130,8 @@ static int frame_list_alloc(dwc_otg_hcd_t *hcd) if (hcd->frame_list) return 0; - hcd->frame_list = DWC_DMA_ALLOC(4 * MAX_FRLIST_EN_NUM, - &hcd->frame_list_dma); + hcd->frame_list = DWC_DMA_ALLOC_ATOMIC(4 * MAX_FRLIST_EN_NUM, + &hcd->frame_list_dma); if (!hcd->frame_list) { retval = -DWC_E_NO_MEMORY; DWC_ERROR("%s: Frame List allocation failed\n", __func__); -- 2.34.1