@@ -89,6 +89,8 @@ struct musb_hw_ep;
# if !ANOMALY_05000456
# define USE_MODE1
# endif
+#else
+# define USE_MODE1
#endif
/*
@@ -662,10 +662,11 @@ static void rxstate(struct musb *musb, struct musb_request *req)
if (request->actual < request->length) {
int transfer_size = 0;
#ifdef USE_MODE1
- transfer_size = min(request->length,
+ transfer_size = min(request->length - request->actual,
channel->max_len);
#else
- transfer_size = len;
+ transfer_size = min(request->length - request->actual,
+ len);
#endif
if (transfer_size <= musb_ep->packet_sz)
musb_ep->dma->desired_mode = 0;