aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/gadget.h
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-09-24 14:19:52 -0500
committerFelipe Balbi <balbi@ti.com>2014-10-20 15:58:48 -0500
commit7a60855972f0d3c014093046cb6f013a1ee5bb19 (patch)
tree8c25e151ddaab4d8840bcd82ba31c0c5eff99a94 /drivers/usb/dwc3/gadget.h
parentusb: dwc3: gadget: hold the lock through set_wedge()'s life (diff)
downloadlinux-dev-7a60855972f0d3c014093046cb6f013a1ee5bb19.tar.xz
linux-dev-7a60855972f0d3c014093046cb6f013a1ee5bb19.zip
usb: dwc3: gadget: fix set_halt() bug with pending transfers
According to our Gadget Framework API documentation, ->set_halt() *must* return -EAGAIN if we have pending transfers (on either direction) or FIFO isn't empty (on TX endpoints). Fix this bug so that the mass storage gadget can be used without stall=0 parameter. This patch should be backported to all kernels since v3.2. Cc: <stable@vger.kernel.org> # v3.2+ Suggested-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.h')
-rw-r--r--drivers/usb/dwc3/gadget.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.h b/drivers/usb/dwc3/gadget.h
index f889008faa63..18ae3eaa8b6f 100644
--- a/drivers/usb/dwc3/gadget.h
+++ b/drivers/usb/dwc3/gadget.h
@@ -86,7 +86,7 @@ int __dwc3_gadget_ep0_set_halt(struct usb_ep *ep, int value);
int dwc3_gadget_ep0_set_halt(struct usb_ep *ep, int value);
int dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request,
gfp_t gfp_flags);
-int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value);
+int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol);
/**
* dwc3_gadget_ep_get_transfer_index - Gets transfer index from HW