usbtest: comment on why this code "expects" negative and positive errnos
usbtest: comment on why this code "expects" negative and positive errnos

On Mon, May 12, 2008 at 01:02:22AM -0700, David Brownell wrote:
> On Sunday 11 May 2008, Marcin Slusarz wrote:
> > 
> > test_ctrl_queue expects (?) positive and negative errnos.
> > what is going on here?
> 
> The sign is just a way to flag something:
> 
>                 /* some faults are allowed, not required */
> 
> The negative ones are required.  Positive codes are optional,
> in the sense that, depending on how the peripheral happens
> to be implemented, they won't necessarily be triggered.
> 
> For example, the test to fetch a device qualifier desriptor
> must succeed if the device is running at high speed.  So that
> test is marked as negative.  But when it's full speed, it
> could legitimately fail; marked as positive.  And so on for
> other tests.
> 
> Look at how the codes are *interpreted* to see it work.

Lets document it.

Based on comment from David Brownell <e543181633fc0fc2787945ef377537d9112d0c96@pacbell.net>.

Signed-off-by: Marcin Slusarz <bc4bbf83189bf2aa3b4ae434673d425054bbfadd@gmail.com>
Cc: David Brownell <e543181633fc0fc2787945ef377537d9112d0c96@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@suse.de>


KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs