usb: dwc3: ep0: Fix ZLP for OUT ep0 requests
stable inclusion from linux-4.19.155 commit 7ba24610f39fb71f37ecb03b8981e6bc8231cafd -------------------------------- commit 66706077 upstream. The current ZLP handling for ep0 requests is only for control IN requests. For OUT direction, DWC3 needs to check and setup for MPS alignment. Usually, control OUT requests can indicate its transfer size via the wLength field of the control message. So usb_request->zero is usually not needed for OUT direction. To handle ZLP OUT for control endpoint, make sure the TRB is MPS size. Cc: stable@vger.kernel.org Fixes: c7fcdeb2 ("usb: dwc3: ep0: simplify EP0 state machine") Fixes: d6e5a549 ("usb: dwc3: simplify ZLP handling") Signed-off-by: NThinh Nguyen <Thinh.Nguyen@synopsys.com> Signed-off-by: NFelipe Balbi <balbi@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录