SAMV7: Trivial correcto to last USBHS device change when using huge request buffers

This commit is contained in:
Gregory Nutt
2015-12-08 11:10:16 -06:00
parent 19520b5c2c
commit cd7c22bbd4
+9 -8
View File
@@ -1020,21 +1020,22 @@ static void sam_dma_wrsetup(struct sam_usbdev_s *priv, struct sam_ep_s *privep,
if (remaining > DMA_MAX_FIFO_SIZE)
{
privreq->inflight = DMA_MAX_FIFO_SIZE;
privep->zlpneeded = false;
}
else
#endif
{
privreq->inflight = remaining;
/* If the size is an exact multple of full packets, then note if that
* we need to send a zero length packet next.
*/
privep->zlpneeded =
((privreq->req.flags & USBDEV_REQFLAGS_NULLPKT) != 0 &&
(remaining % privep->ep.maxpacket) == 0);
}
/* If the size is an exact multple of full packets, then note if that
* we need to send a zero length packet next.
*/
privep->zlpneeded =
((privreq->req.flags & USBDEV_REQFLAGS_NULLPKT) != 0 &&
(remaining % privep->ep.maxpacket) == 0);
/* And perform the single DMA transfer.
*
* 32.6.10.6 Bulk IN or Interrupt IN: Sending a Buffer Using DMA