Re: [PATCH, RFC] usbmon: correct computing of the ISO packets with mmap

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Németh Márton
Date: Sunday, November 14, 2010 - 10:48 pm

Hi Pete,
Pete Zaitcev írta:

I think there are four cases for ISO communication URBs:

ev_type == 'S' && usb_urb_dir_in(urb)  ---> we don't need the data
ev_type == 'C' && usb_urb_dir_in(urb)  ---> data is available, we'll need it
ev_type == 'S' && usb_urb_dir_out(urb)  ---> data is available, we'll need it
ev_type == 'C' && usb_urb_dir_out(urb)  ---> we don't need the data

I cannot say for sure which field contains the length in case of ISO out submit
URBs.

I'll test the patch later in my environment.


I don't know whether the compiler will optimize the two times computing the
expression (fp->offset + fp->actual_length). Maybe I would use a local variable
to compute the sum before the "if" and then use just the local variable.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
usbmon: size of different fields?, Németh Márton, (Mon Nov 8, 11:40 pm)
Re: usbmon: size of different fields?, Pete Zaitcev, (Tue Nov 9, 7:50 am)
Re: usbmon: size of different fields?, Németh Márton, (Tue Nov 9, 1:05 pm)
Re: usbmon: size of different fields?, Pete Zaitcev, (Wed Nov 10, 8:21 am)
Re: usbmon: size of different fields?, Guy Harris, (Wed Nov 10, 10:36 am)
Re: [PATCH, RFC] usbmon: correct computing of the ISO pack ..., Németh Márton, (Sun Nov 14, 10:48 pm)