author | qi duan <qi.duan@amlogic.com> | 2018-03-06 10:06:15 (GMT) |
---|---|---|
committer | jie.yuan <jie.yuan@amlogic.com> | 2018-03-09 11:14:34 (GMT) |
commit | 4aa7c08a2f4888cc7f912b751cd59fd633177ea2 (patch) | |
tree | 76c97d84f062f5e2e0723b86f3a38cca3b19457e | |
parent | b9295261c1ffefafbbd27fe944af3f8ea13d09c6 (diff) | |
download | common-4aa7c08a2f4888cc7f912b751cd59fd633177ea2.zip common-4aa7c08a2f4888cc7f912b751cd59fd633177ea2.tar.gz common-4aa7c08a2f4888cc7f912b751cd59fd633177ea2.tar.bz2 |
USB: PCD: fix setup packet count issue
PD#161573: USB: PCD: fix setup packet count issue.
merge from dwc_otg version3.30a
Change-Id: I636129dfadc0b28e04d09df771aa062ee73670fa
Signed-off-by: qi duan <qi.duan@amlogic.com>
-rw-r--r-- | drivers/amlogic/usb/dwc_otg/310/dwc_otg_pcd_intr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/amlogic/usb/dwc_otg/310/dwc_otg_pcd_intr.c b/drivers/amlogic/usb/dwc_otg/310/dwc_otg_pcd_intr.c index 2c4f27f..901cf6e 100644 --- a/drivers/amlogic/usb/dwc_otg/310/dwc_otg_pcd_intr.c +++ b/drivers/amlogic/usb/dwc_otg/310/dwc_otg_pcd_intr.c @@ -1807,12 +1807,16 @@ static inline void pcd_setup(dwc_otg_pcd_t *pcd) ("\n\n----------- CANNOT handle > 1 setup packet in DMA mode\n\n"); if ((core_if->snpsid >= OTG_CORE_REV_3_00a) - && (core_if->dma_enable == 1) && (core_if->dma_desc_enable == 0)) + && (core_if->dma_enable == 1) && (core_if->dma_desc_enable == 0)) { + if (doeptsize0.b.supcnt == 3 && ep0->dwc_ep.stp_rollover == 0) { + DWC_ERROR(" !!! Setup packet count\n"); + return; + } ctrl = (pcd->setup_pkt + (3 - doeptsize0.b.supcnt - 1 + ep0->dwc_ep.stp_rollover))->req; - + } #ifdef DEBUG_EP0 DWC_DEBUGPL(DBG_PCD, "SETUP %02x.%02x v%04x i%04x l%04x\n", ctrl.bmRequestType, ctrl.bRequest, |