lkml.org 
[lkml]   [2010]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH, RFC] usbmon: correct computing of the ISO packets with mmap
On Sun, 14 Nov 2010, Pete Zaitcev wrote:

> > > + while (ndesc-- != 0) {
> > > + if (fp->status == 0 && fp->actual_length != 0) {
> >
> > I'd leave out the fp->status == 0 test. It's not relevant; a buffer
> > can contain valid data even if the final status isn't 0.
>
> That's a good point, however is actual_length filled in such case?
> I thought it was either one or the other.

No, it's possible to have both. This is less likely with isochronous
than with the other transfer types, but it can happen. For example,
consider a high-bandwidth high-speed transfer where 3072 bytes are
received in three packets during a single microframe. You might
receive two of the three packets, giving actual_length = 2048, and then
not receive the third, giving status = -EPROTO.

Alan Stern



\
 
 \ /
  Last update: 2010-11-15 16:05    [W:1.371 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site