Hi > -----Original Message----- > From: Mian Yousaf Kaukab [mailto:yousaf.kaukab@xxxxxxxxx] > Sent: Sunday, December 21, 2014 5:15 PM > To: linux-usb@xxxxxxxxxxxxxxx; balbi@xxxxxx > Cc: Herrero, Gregory; paulz@xxxxxxxxxxxx; > sergei.shtylyov@xxxxxxxxxxxxxxxxxx; Kaukab, Yousaf > Subject: [PATCH v1 03/29] usb: dwc2: gadget: process setup packet on transfer > complete > > DOEPINTn.SetUp also indicates an OUT token for the data stage, so instead use > DOEPINTn.StupPktRcvd. Moreover, check DOEPINTn.StupPktRcvd on > DOEPINTn.XferComp as described in programming guide. > According to the programming guide, DIEPCTL.CNAK should not be set for the DATA stage unless DOEPINTn.SetUp is seen. If setup packet is processed on DOEPINTn.StupPktRcvd and s3c_hsotg_start_req() is called before a IN/NAK or Out/NAK is seen on the bus, there is a chance that DIEPCTL.CNAK rule is violated. As a result no interrupt might be seen for the DATA stage transfers. So it's better to process the setup packet on DOEPINTn.SetUp. Only change required is not to call s3c_hsotg_complete_in() or s3c_hsotg_handle_outdone in DOEPINTn.XferCompl handling when DOEPINTn.StupPktRcvd or DOEPINTn.SetUp is set. I will replace it with another patch to do this. BR, Yousaf -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html