From 14032f9d90131ceb0f63a9f31b392848d80ba011 Mon Sep 17 00:00:00 2001 From: lyz Date: Wed, 23 Oct 2013 15:50:05 +0800 Subject: [PATCH] usb: fix EP0 does not handle req->zero bug --- drivers/usb/dwc_otg/dwc_otg_pcd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc_otg/dwc_otg_pcd.c b/drivers/usb/dwc_otg/dwc_otg_pcd.c index 16222daa83b9..e116c65e0f7d 100755 --- a/drivers/usb/dwc_otg/dwc_otg_pcd.c +++ b/drivers/usb/dwc_otg/dwc_otg_pcd.c @@ -652,8 +652,10 @@ static int dwc_otg_pcd_ep_queue(struct usb_ep *_ep, DWC_DEBUGPL(DBG_PCD, "%s ep0: EP0_IN_DATA_PHASE\n", __func__); - if((_req->length % MAX_EP0_SIZE) == 0) - ep->dwc_ep.sent_zlp = 1; + if((_req->length % MAX_EP0_SIZE) == 0){ + if(_req->zero) + ep->dwc_ep.sent_zlp = 1; + } break; case EP0_OUT_DATA_PHASE: -- 2.34.1