diff options
| author | Hemant Kumar <hemantk@codeaurora.org> | 2016-04-19 11:28:31 -0700 |
|---|---|---|
| committer | Jeevan Shriram <jshriram@codeaurora.org> | 2016-04-22 15:04:29 -0700 |
| commit | 7ab51c2789099436a3e792f8e9af8c7b50e1dfdd (patch) | |
| tree | aeac639ae0209de494a79ed0030d516e67a3b3f4 /drivers/usb/gadget/function | |
| parent | 99e000989b409c6183ec8f012c019c5c499aab8a (diff) | |
usb: gadget: f_gsi: Fix bug in handling control transfer
Driver is overriding the ep0 request context with gsi driver
context even if it does not intend to handle the setup completion.
This is causing flood of warnings when composite_setup_complete()
is type casting the function driver context as cdev and failing to
match ep0 request pointer with cdev->req. Hence only override
context when driver is overriding the complete call back.
CRs-Fixed: 1003784
Change-Id: I176671ae09f17d920643eeeec8262a6f97856712
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Diffstat (limited to 'drivers/usb/gadget/function')
| -rw-r--r-- | drivers/usb/gadget/function/f_gsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_gsi.c b/drivers/usb/gadget/function/f_gsi.c index 5ff80dc7d12d..24a53fdacfad 100644 --- a/drivers/usb/gadget/function/f_gsi.c +++ b/drivers/usb/gadget/function/f_gsi.c @@ -1544,6 +1544,7 @@ gsi_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl) goto invalid; /* read the request; process it later */ value = w_length; + req->context = gsi; if (gsi->prot_id == IPA_USB_RNDIS) req->complete = gsi_rndis_command_complete; else @@ -1663,7 +1664,6 @@ invalid: log_event_dbg("req%02x.%02x v%04x i%04x l%d", ctrl->bRequestType, ctrl->bRequest, w_value, w_index, w_length); - req->context = gsi; req->zero = (value < w_length); req->length = value; value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC); |
