提交 485f44d0 编写于 作者: R Ricardo Ribalda Delgado 提交者: Felipe Balbi

usb: gadget: udc: net2280: Clean function net2280_queue

Do not duplicate the code for the else branch of the condition.
Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 e721c457
...@@ -937,24 +937,12 @@ net2280_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) ...@@ -937,24 +937,12 @@ net2280_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
_req->actual = 0; _req->actual = 0;
/* kickstart this i/o queue? */ /* kickstart this i/o queue? */
if (list_empty(&ep->queue) && !ep->stopped) { if (list_empty(&ep->queue) && !ep->stopped &&
/* DMA request while EP halted */ !((dev->quirks & PLX_SUPERSPEED) && ep->dma &&
if (ep->dma && (readl(&ep->regs->ep_rsp) & BIT(CLEAR_ENDPOINT_HALT)))) {
(readl(&ep->regs->ep_rsp) & BIT(CLEAR_ENDPOINT_HALT)) &&
(dev->quirks & PLX_SUPERSPEED)) {
int valid = 1;
if (ep->is_in) {
int expect;
expect = likely(req->req.zero ||
((req->req.length %
ep->ep.maxpacket) != 0));
if (expect != ep->in_fifo_validate)
valid = 0;
}
queue_dma(ep, req, valid);
}
/* use DMA if the endpoint supports it, else pio */ /* use DMA if the endpoint supports it, else pio */
else if (ep->dma) if (ep->dma)
start_dma(ep, req); start_dma(ep, req);
else { else {
/* maybe there's no control data, just status ack */ /* maybe there's no control data, just status ack */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册