Loading drivers/usb/dwc3/core.h +0 −3 Original line number Diff line number Diff line Loading @@ -649,7 +649,6 @@ struct dwc3_event_buffer { * @cancelled_list: list of cancelled requests for this endpoint * @pending_list: list of pending requests for this endpoint * @started_list: list of started requests on this endpoint * @wait_end_transfer: wait_queue_head_t for waiting on End Transfer complete * @lock: spinlock for endpoint request queue traversal * @regs: pointer to first endpoint register * @trb_pool: array of transaction buffers Loading Loading @@ -678,8 +677,6 @@ struct dwc3_ep { struct list_head pending_list; struct list_head started_list; wait_queue_head_t wait_end_transfer; spinlock_t lock; void __iomem *regs; Loading drivers/usb/dwc3/gadget.c +1 −39 Original line number Diff line number Diff line Loading @@ -647,8 +647,6 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, unsigned int action) reg |= DWC3_DALEPENA_EP(dep->number); dwc3_writel(dwc->regs, DWC3_DALEPENA, reg); init_waitqueue_head(&dep->wait_end_transfer); if (usb_endpoint_xfer_control(desc)) goto out; Loading Loading @@ -1538,15 +1536,11 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep, if (r == req) { /* wait until it is processed */ dwc3_stop_active_transfer(dep, true); wait_event_lock_irq(dep->wait_end_transfer, !(dep->flags & DWC3_EP_END_TRANSFER_PENDING), dwc->lock); if (!r->trb) goto out0; dwc3_gadget_move_cancelled_request(req); dwc3_gadget_ep_cleanup_cancelled_requests(dep); goto out0; } dev_err(dwc->dev, "request %pK was not queued to %s\n", Loading Loading @@ -2051,8 +2045,6 @@ static int dwc3_gadget_stop(struct usb_gadget *g) { struct dwc3 *dwc = gadget_to_dwc(g); unsigned long flags; int epnum; u32 tmo_eps = 0; spin_lock_irqsave(&dwc->lock, flags); Loading @@ -2061,36 +2053,6 @@ static int dwc3_gadget_stop(struct usb_gadget *g) __dwc3_gadget_stop(dwc); for (epnum = 2; epnum < DWC3_ENDPOINTS_NUM; epnum++) { struct dwc3_ep *dep = dwc->eps[epnum]; int ret; if (!dep) continue; if (!(dep->flags & DWC3_EP_END_TRANSFER_PENDING)) continue; ret = wait_event_interruptible_lock_irq_timeout(dep->wait_end_transfer, !(dep->flags & DWC3_EP_END_TRANSFER_PENDING), dwc->lock, msecs_to_jiffies(5)); if (ret <= 0) { /* Timed out or interrupted! There's nothing much * we can do so we just log here and print which * endpoints timed out at the end. */ tmo_eps |= 1 << epnum; dep->flags &= DWC3_EP_END_TRANSFER_PENDING; } } if (tmo_eps) { dev_err(dwc->dev, "end transfer timed out on endpoints 0x%x [bitmap]\n", tmo_eps); } out: dwc->gadget_driver = NULL; spin_unlock_irqrestore(&dwc->lock, flags); Loading Loading @@ -2589,7 +2551,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc, if (cmd == DWC3_DEPCMD_ENDTRANSFER) { dep->flags &= ~DWC3_EP_END_TRANSFER_PENDING; wake_up(&dep->wait_end_transfer); dwc3_gadget_ep_cleanup_cancelled_requests(dep); } break; case DWC3_DEPEVT_STREAMEVT: Loading Loading
drivers/usb/dwc3/core.h +0 −3 Original line number Diff line number Diff line Loading @@ -649,7 +649,6 @@ struct dwc3_event_buffer { * @cancelled_list: list of cancelled requests for this endpoint * @pending_list: list of pending requests for this endpoint * @started_list: list of started requests on this endpoint * @wait_end_transfer: wait_queue_head_t for waiting on End Transfer complete * @lock: spinlock for endpoint request queue traversal * @regs: pointer to first endpoint register * @trb_pool: array of transaction buffers Loading Loading @@ -678,8 +677,6 @@ struct dwc3_ep { struct list_head pending_list; struct list_head started_list; wait_queue_head_t wait_end_transfer; spinlock_t lock; void __iomem *regs; Loading
drivers/usb/dwc3/gadget.c +1 −39 Original line number Diff line number Diff line Loading @@ -647,8 +647,6 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, unsigned int action) reg |= DWC3_DALEPENA_EP(dep->number); dwc3_writel(dwc->regs, DWC3_DALEPENA, reg); init_waitqueue_head(&dep->wait_end_transfer); if (usb_endpoint_xfer_control(desc)) goto out; Loading Loading @@ -1538,15 +1536,11 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep, if (r == req) { /* wait until it is processed */ dwc3_stop_active_transfer(dep, true); wait_event_lock_irq(dep->wait_end_transfer, !(dep->flags & DWC3_EP_END_TRANSFER_PENDING), dwc->lock); if (!r->trb) goto out0; dwc3_gadget_move_cancelled_request(req); dwc3_gadget_ep_cleanup_cancelled_requests(dep); goto out0; } dev_err(dwc->dev, "request %pK was not queued to %s\n", Loading Loading @@ -2051,8 +2045,6 @@ static int dwc3_gadget_stop(struct usb_gadget *g) { struct dwc3 *dwc = gadget_to_dwc(g); unsigned long flags; int epnum; u32 tmo_eps = 0; spin_lock_irqsave(&dwc->lock, flags); Loading @@ -2061,36 +2053,6 @@ static int dwc3_gadget_stop(struct usb_gadget *g) __dwc3_gadget_stop(dwc); for (epnum = 2; epnum < DWC3_ENDPOINTS_NUM; epnum++) { struct dwc3_ep *dep = dwc->eps[epnum]; int ret; if (!dep) continue; if (!(dep->flags & DWC3_EP_END_TRANSFER_PENDING)) continue; ret = wait_event_interruptible_lock_irq_timeout(dep->wait_end_transfer, !(dep->flags & DWC3_EP_END_TRANSFER_PENDING), dwc->lock, msecs_to_jiffies(5)); if (ret <= 0) { /* Timed out or interrupted! There's nothing much * we can do so we just log here and print which * endpoints timed out at the end. */ tmo_eps |= 1 << epnum; dep->flags &= DWC3_EP_END_TRANSFER_PENDING; } } if (tmo_eps) { dev_err(dwc->dev, "end transfer timed out on endpoints 0x%x [bitmap]\n", tmo_eps); } out: dwc->gadget_driver = NULL; spin_unlock_irqrestore(&dwc->lock, flags); Loading Loading @@ -2589,7 +2551,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc, if (cmd == DWC3_DEPCMD_ENDTRANSFER) { dep->flags &= ~DWC3_EP_END_TRANSFER_PENDING; wake_up(&dep->wait_end_transfer); dwc3_gadget_ep_cleanup_cancelled_requests(dep); } break; case DWC3_DEPEVT_STREAMEVT: Loading