diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2011-11-25 15:03:46 +0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 13:48:45 +0400 |
commit | e0ce0b0a0ae5a31ee96b38a7c5390f867634b4f6 (patch) | |
tree | 936b76647c9b96995e7f2129f17121a6e6f1f7dc /drivers/usb/dwc3/ep0.c | |
parent | 164d773168d7f09ecd46d9ce9b07f194ea97bf33 (diff) | |
download | linux-e0ce0b0a0ae5a31ee96b38a7c5390f867634b4f6.tar.xz |
usb: dwc3: ep0: use dwc3_request for ep0 requsts instead of usb_request
Instead of special functions and shortcuts for sending our internal
answers to the host we started doing what the gadget does and used the
public API for this. Since we only were using a few fields the
usb_request was enough. Later added the list handling in order to
synchronize the host / gadget events and now we require to have the
dwc3_request struct around our usb_request or else we touch memory that
does not belong to us. So this patch does this.
Reported-by: Partha Basak <p-basak2@ti.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/ep0.c')
-rw-r--r-- | drivers/usb/dwc3/ep0.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index ed44525c8d62..1ba86a114655 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -302,10 +302,10 @@ static int dwc3_ep0_handle_status(struct dwc3 *dwc, response_pkt = (__le16 *) dwc->setup_buf; *response_pkt = cpu_to_le16(usb_status); - dwc->ep0_usb_req.length = sizeof(*response_pkt); - dwc->ep0_usb_req.dma = dwc->setup_buf_addr; - dwc->ep0_usb_req.complete = dwc3_ep0_status_cmpl; - return usb_ep_queue(&dwc->eps[0]->endpoint, &dwc->ep0_usb_req, + dwc->ep0_usb_req.request.length = sizeof(*response_pkt); + dwc->ep0_usb_req.request.dma = dwc->setup_buf_addr; + dwc->ep0_usb_req.request.complete = dwc3_ep0_status_cmpl; + return usb_ep_queue(&dwc->eps[0]->endpoint, &dwc->ep0_usb_req.request, GFP_ATOMIC); } |