Skip to content

Commit

Permalink
usb: dwc3: fix a WARN and a comment
Browse files Browse the repository at this point in the history
we're now have DWC3_EP0_BOUNCE_SIZE to tell
us the actual size of the bufer. Let's use that
instead of ep0 wMaxPacketSize.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Jun 3, 2012
1 parent f8f5701 commit 4552a0c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/usb/dwc3/ep0.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,14 +821,14 @@ static void dwc3_ep0_do_control_data(struct dwc3 *dwc,
return;
}

WARN_ON(req->request.length > dep->endpoint.maxpacket);
WARN_ON(req->request.length > DWC3_EP0_BOUNCE_SIZE);

dwc->ep0_bounced = true;

/*
* REVISIT in case request length is bigger than EP0
* wMaxPacketSize, we will need two chained TRBs to handle
* the transfer.
* REVISIT in case request length is bigger than
* DWC3_EP0_BOUNCE_SIZE we will need two chained
* TRBs to handle the transfer.
*/
ret = dwc3_ep0_start_trans(dwc, event->endpoint_number,
dwc->ep0_bounce_addr, dep->endpoint.maxpacket,
Expand Down

0 comments on commit 4552a0c

Please sign in to comment.