Loading drivers/usb/dwc3/core.h +0 −2 Original line number Diff line number Diff line Loading @@ -568,7 +568,6 @@ struct dwc3_ep_events { * @started_list: list of started requests on this endpoint * @lock: spinlock for endpoint request queue traversal * @regs: pointer to first endpoint register * @trb_dma_pool: dma pool used to get aligned trb memory pool * @trb_pool: array of transaction buffers * @trb_pool_dma: dma address of @trb_pool * @num_trbs: num of trbs in the trb dma pool Loading Loading @@ -600,7 +599,6 @@ struct dwc3_ep { spinlock_t lock; void __iomem *regs; struct dma_pool *trb_dma_pool; struct dwc3_trb *trb_pool; dma_addr_t trb_pool_dma; u32 num_trbs; Loading drivers/usb/dwc3/dwc3-msm.c +11 −18 Original line number Diff line number Diff line Loading @@ -1052,25 +1052,17 @@ static int gsi_prepare_trbs(struct usb_ep *ep, struct usb_gsi_request *req) int num_trbs = (dep->direction) ? (2 * (req->num_bufs) + 2) : (req->num_bufs + 2); dep->trb_dma_pool = dma_pool_create(ep->name, dwc->sysdev, dep->trb_pool = dma_zalloc_coherent(dwc->sysdev, num_trbs * sizeof(struct dwc3_trb), num_trbs * sizeof(struct dwc3_trb), 0); if (!dep->trb_dma_pool) { dev_err(dep->dwc->dev, "failed to alloc trb dma pool for %s\n", dep->name); return -ENOMEM; } &dep->trb_pool_dma, GFP_KERNEL); dep->num_trbs = num_trbs; dep->trb_pool = dma_pool_alloc(dep->trb_dma_pool, GFP_KERNEL, &dep->trb_pool_dma); if (!dep->trb_pool) { dev_err(dep->dwc->dev, "failed to allocate trb pool for %s\n", dev_err(dep->dwc->dev, "failed to alloc trb dma pool for %s\n", dep->name); return -ENOMEM; } dep->num_trbs = num_trbs; /* IN direction */ if (dep->direction) { for (i = 0; i < num_trbs ; i++) { Loading Loading @@ -1160,18 +1152,19 @@ static int gsi_prepare_trbs(struct usb_ep *ep, struct usb_gsi_request *req) static void gsi_free_trbs(struct usb_ep *ep) { struct dwc3_ep *dep = to_dwc3_ep(ep); struct dwc3 *dwc = dep->dwc; if (dep->endpoint.ep_type == EP_TYPE_NORMAL) return; /* Free TRBs and TRB pool for EP */ if (dep->trb_dma_pool) { dma_pool_free(dep->trb_dma_pool, dep->trb_pool, if (dep->trb_pool_dma) { dma_free_coherent(dwc->sysdev, dep->num_trbs * sizeof(struct dwc3_trb), dep->trb_pool, dep->trb_pool_dma); dma_pool_destroy(dep->trb_dma_pool); dep->trb_pool = NULL; dep->trb_pool_dma = 0; dep->trb_dma_pool = NULL; } } /* Loading Loading
drivers/usb/dwc3/core.h +0 −2 Original line number Diff line number Diff line Loading @@ -568,7 +568,6 @@ struct dwc3_ep_events { * @started_list: list of started requests on this endpoint * @lock: spinlock for endpoint request queue traversal * @regs: pointer to first endpoint register * @trb_dma_pool: dma pool used to get aligned trb memory pool * @trb_pool: array of transaction buffers * @trb_pool_dma: dma address of @trb_pool * @num_trbs: num of trbs in the trb dma pool Loading Loading @@ -600,7 +599,6 @@ struct dwc3_ep { spinlock_t lock; void __iomem *regs; struct dma_pool *trb_dma_pool; struct dwc3_trb *trb_pool; dma_addr_t trb_pool_dma; u32 num_trbs; Loading
drivers/usb/dwc3/dwc3-msm.c +11 −18 Original line number Diff line number Diff line Loading @@ -1052,25 +1052,17 @@ static int gsi_prepare_trbs(struct usb_ep *ep, struct usb_gsi_request *req) int num_trbs = (dep->direction) ? (2 * (req->num_bufs) + 2) : (req->num_bufs + 2); dep->trb_dma_pool = dma_pool_create(ep->name, dwc->sysdev, dep->trb_pool = dma_zalloc_coherent(dwc->sysdev, num_trbs * sizeof(struct dwc3_trb), num_trbs * sizeof(struct dwc3_trb), 0); if (!dep->trb_dma_pool) { dev_err(dep->dwc->dev, "failed to alloc trb dma pool for %s\n", dep->name); return -ENOMEM; } &dep->trb_pool_dma, GFP_KERNEL); dep->num_trbs = num_trbs; dep->trb_pool = dma_pool_alloc(dep->trb_dma_pool, GFP_KERNEL, &dep->trb_pool_dma); if (!dep->trb_pool) { dev_err(dep->dwc->dev, "failed to allocate trb pool for %s\n", dev_err(dep->dwc->dev, "failed to alloc trb dma pool for %s\n", dep->name); return -ENOMEM; } dep->num_trbs = num_trbs; /* IN direction */ if (dep->direction) { for (i = 0; i < num_trbs ; i++) { Loading Loading @@ -1160,18 +1152,19 @@ static int gsi_prepare_trbs(struct usb_ep *ep, struct usb_gsi_request *req) static void gsi_free_trbs(struct usb_ep *ep) { struct dwc3_ep *dep = to_dwc3_ep(ep); struct dwc3 *dwc = dep->dwc; if (dep->endpoint.ep_type == EP_TYPE_NORMAL) return; /* Free TRBs and TRB pool for EP */ if (dep->trb_dma_pool) { dma_pool_free(dep->trb_dma_pool, dep->trb_pool, if (dep->trb_pool_dma) { dma_free_coherent(dwc->sysdev, dep->num_trbs * sizeof(struct dwc3_trb), dep->trb_pool, dep->trb_pool_dma); dma_pool_destroy(dep->trb_dma_pool); dep->trb_pool = NULL; dep->trb_pool_dma = 0; dep->trb_dma_pool = NULL; } } /* Loading