Commit de497f63 authored by Alan Stern's avatar Alan Stern Committed by Felipe Balbi

USB: UDC: net22{80,72}: remove mistaken test of req->zero

The net2280 UDC driver (and also net2272, probably via copy-and-paste)
incorrectly checks the req->zero flag during OUT transfers, after
copying data from the UDC's FIFO into memory.  This makes no sense at
all; the "zero" flag indicates that an extra zero-length packet should
be appended to an IN transfer if the length is an even multiple of the
maxpacket size.  It has nothing to do with OUT transfers.

In practice this doesn't cause any problems because gadget drivers
never set req->zero for OUT transfers anyway.  Still, it is an error
and unnecessary code, so this patch removes the check.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 6574abe6
...@@ -573,8 +573,7 @@ net2272_read_fifo(struct net2272_ep *ep, struct net2272_request *req) ...@@ -573,8 +573,7 @@ net2272_read_fifo(struct net2272_ep *ep, struct net2272_request *req)
/* completion */ /* completion */
if (unlikely(cleanup || is_short || if (unlikely(cleanup || is_short ||
((req->req.actual == req->req.length) req->req.actual == req->req.length)) {
&& !req->req.zero))) {
if (cleanup) { if (cleanup) {
net2272_out_flush(ep); net2272_out_flush(ep);
......
...@@ -789,8 +789,7 @@ static int read_fifo(struct net2280_ep *ep, struct net2280_request *req) ...@@ -789,8 +789,7 @@ static int read_fifo(struct net2280_ep *ep, struct net2280_request *req)
(void) readl(&ep->regs->ep_rsp); (void) readl(&ep->regs->ep_rsp);
} }
return is_short || ((req->req.actual == req->req.length) && return is_short || req->req.actual == req->req.length;
!req->req.zero);
} }
/* fill out dma descriptor to match a given request */ /* fill out dma descriptor to match a given request */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment