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>
This commit is contained in:
parent
99e000989b
commit
7ab51c2789
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue