usb: gadget: s3c-hsotg: add flush TX FIFO when kill all requests
[deliverable/linux.git] / drivers / usb / gadget / s3c-hsotg.c
index 9875d9c0823f7c554744a40acb0a70897dde0bc6..6c80bfcefa87051e63418476f78344a0694696bd 100644 (file)
@@ -2080,13 +2080,13 @@ static void s3c_hsotg_irq_enumdone(struct s3c_hsotg *hsotg)
        case DSTS_EnumSpd_FS48:
                hsotg->gadget.speed = USB_SPEED_FULL;
                ep0_mps = EP0_MPS_LIMIT;
-               ep_mps = 64;
+               ep_mps = 1023;
                break;
 
        case DSTS_EnumSpd_HS:
                hsotg->gadget.speed = USB_SPEED_HIGH;
                ep0_mps = EP0_MPS_LIMIT;
-               ep_mps = 512;
+               ep_mps = 1024;
                break;
 
        case DSTS_EnumSpd_LS:
@@ -2150,6 +2150,9 @@ static void kill_all_requests(struct s3c_hsotg *hsotg,
                s3c_hsotg_complete_request(hsotg, ep, req,
                                           result);
        }
+       if(hsotg->dedicated_fifos)
+               if ((readl(hsotg->regs + DTXFSTS(ep->index)) & 0xffff) * 4 < 3072)
+                       s3c_hsotg_txfifo_flush(hsotg, ep->index);
 }
 
 #define call_gadget(_hs, _entry) \
This page took 0.024616 seconds and 5 git commands to generate.