diff options
author | Razmik Karapetyan <razmik@synopsys.com> | 2016-11-16 15:33:57 -0800 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-18 13:54:53 +0200 |
commit | c3b22fe2e4cc45adb037e204e08910e10c5e9286 (patch) | |
tree | d8aa5aa793e8555787b30baa20769d9dd0c31730 /drivers/usb/dwc2/gadget.c | |
parent | 729e65746d4f225792e33371f3ae6d614ec66032 (diff) | |
download | linux-c3b22fe2e4cc45adb037e204e08910e10c5e9286.tar.bz2 |
usb: dwc2: Fix Control Write issue in DMA mode
While sending zlp for DWC2_EP0_STATUS_IN EP direction was changed to IN.
Change it back to complete OUT transfer request.
This affects only on DMA mode, because DMA buffer map/unmap function is
direction sensitive.
Signed-off-by: Razmik Karapetyan <razmik@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/gadget.c')
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 4dd5f1e2d281..39eccbb008b7 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2527,6 +2527,13 @@ static void dwc2_hsotg_complete_in(struct dwc2_hsotg *hsotg, /* Finish ZLP handling for IN EP0 transactions */ if (hs_ep->index == 0 && hsotg->ep0_state == DWC2_EP0_STATUS_IN) { dev_dbg(hsotg->dev, "zlp packet sent\n"); + + /* + * While send zlp for DWC2_EP0_STATUS_IN EP direction was + * changed to IN. Change back to complete OUT transfer request + */ + hs_ep->dir_in = 0; + dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); if (hsotg->test_mode) { int ret; |