Fix read failures when OUT req size > maxpacket
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1086 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
bca6c1e63d
commit
05f8581874
@ -518,6 +518,8 @@
|
||||
to terminate an IN transfer with a short packet (zero-length if necessary).
|
||||
* Fix an error in the NXP LPC214x USB device driver that was causing corruption of
|
||||
the request queue (M320 driver also fixed, untested)
|
||||
* Correct another error in the NXP LPC214x USB device driver that caused read failures
|
||||
when the request buffer size was larger than maxpacket.
|
||||
|
||||
|
||||
|
||||
|
@ -1148,6 +1148,8 @@ nuttx-0.3.17 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
to terminate an IN transfer with a short packet (zero-length if necessary).
|
||||
* Fix an error in the NXP LPC214x USB device driver that was causing corruption of
|
||||
the request queue (M320 driver also fixed, untested)
|
||||
* Correct another error in the NXP LPC214x USB device driver that caused read failures
|
||||
when the request buffer size was larger than maxpacket.
|
||||
|
||||
pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
|
@ -1039,11 +1039,8 @@ static int dm320_rdrequest(struct dm320_ep_s *privep)
|
||||
}
|
||||
|
||||
usbtrace(TRACE_READ(privep->epphy), privreq->req.xfrd);
|
||||
for (;;)
|
||||
{
|
||||
/* Receive the next packet if (1) there are more bytes to be receive, or
|
||||
* (2) the last packet was exactly maxpacketsize.
|
||||
*/
|
||||
|
||||
/* Receive the next packet */
|
||||
|
||||
buf = privreq->req.buf + privreq->req.xfrd;
|
||||
nbytesread = dm320_epread(privep->epphy, buf, privep->ep.maxpacket);
|
||||
@ -1062,11 +1059,9 @@ static int dm320_rdrequest(struct dm320_ep_s *privep)
|
||||
{
|
||||
usbtrace(TRACE_COMPLETE(privep->epphy), privreq->req.xfrd);
|
||||
dm320_reqcomplete(privep, OK);
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
|
||||
return OK; /* Won't get here */
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -1136,11 +1136,8 @@ static int lpc214x_rdrequest(struct lpc214x_ep_s *privep)
|
||||
}
|
||||
|
||||
usbtrace(TRACE_READ(privep->epphy), privreq->req.xfrd);
|
||||
for (;;)
|
||||
{
|
||||
/* Receive the next packet if (1) there are more bytes to be receive, or
|
||||
* (2) the last packet was exactly maxpacketsize.
|
||||
*/
|
||||
|
||||
/* Receive the next packet */
|
||||
|
||||
buf = privreq->req.buf + privreq->req.xfrd;
|
||||
nbytesread = lpc214x_epread(privep->epphy, buf, privep->ep.maxpacket);
|
||||
@ -1159,11 +1156,9 @@ static int lpc214x_rdrequest(struct lpc214x_ep_s *privep)
|
||||
{
|
||||
usbtrace(TRACE_COMPLETE(privep->epphy), privreq->req.xfrd);
|
||||
lpc214x_reqcomplete(privep, OK);
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
|
||||
return OK; /* Won't get here */
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user