Hello.

On 1/2/2015 5:42 PM, Mian Yousaf Kaukab wrote:

Only process DOEPINT.XferCompl on data packet as DOEPINTn.SetUp can
occur with or without DOEPINT.XferCompl. When DOEPINT.SetUp occurs
with DOEPINT.XferCompl, only DOEPINT.SetUp needs to be handled.

Moreover, ignore DOEPINT.XferCompl when it occurs with
DOEPINT.StupPktRcvd as driver needs to wait for DOEPINT.SetUp to
continue.

Signed-off-by: Mian Yousaf Kaukab <yousaf.kau...@intel.com>
---
  drivers/usb/dwc2/gadget.c | 4 ++++
  drivers/usb/dwc2/hw.h     | 1 +
  2 files changed, 5 insertions(+)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 843f3ee..e190d68 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -1810,6 +1810,10 @@ static void s3c_hsotg_epint(struct dwc2_hsotg *hsotg, 
unsigned int idx,
        dev_dbg(hsotg->dev, "%s: ep%d(%s) DxEPINT=0x%08x\n",
                __func__, idx, dir_in ? "in" : "out", ints);

+       /* Don't process XferCompl interrupt if it is a setup packet */
+       if (ints & DXEPINT_SETUP || ints & DXEPINT_SETUP_RCVD)

        if (ints & (DXEPINT_SETUP | DXEPINT_SETUP_RCVD))

[...]

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to