lkml.org 
[lkml]   [2008]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: drivers/usb/misc/usbtest.c weirdness
Date
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.


\
 
 \ /
  Last update: 2008-05-12 10:19    [W:0.048 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site