From: wlf Date: Wed, 16 Jul 2014 10:06:43 +0000 (+0800) Subject: USB: fix dwc_otg hcd desc dma allocate memory with GFP_ATOMIC. X-Git-Tag: firefly_0821_release~4972 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=531563a29f2595674b464c3a6b5931b1aa7b8804;p=firefly-linux-kernel-4.4.55.git USB: fix dwc_otg hcd desc dma allocate memory with GFP_ATOMIC. --- 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__);