On Wed, 20 Dec 2006 10:04:01 -0500 (EST), Alan Stern <[EMAIL PROTECTED]> wrote:
> > Assuming x86 32, -115 = -EINPROGRESS, that means URB still pending, no > > results yet > > All successful Submission ('S') lines will contain this code. > > > > e.g. status code "-2" > > > > -2 = -ENOENT, specified interface or endpoint does not exist or is not > > enabled > > That's would the code would mean if it appeared on a Submission line. But > when it appears on a Completion ('C') line it means "URB was synchronously > unlinked by usb_unlink_urb". I hate to disappoint you, Alan, but this is not how usbmon works. Errors in submission are reported with 'E' event immediately after the submission. So the monitoring application sees 'S' (which is always successful, the status should be always ignored), and possibly 'E'. I consider it a fairly serious deficiency, but I don't have a good idea how to fix it (without a performance penalty). The naive approach would be to have a dual hook in the submission path. The first hook creates a record, which is held back by the usbmon and not seen by the application. The second hook updates the status (either success or failure) and releases the record. If a callback is called on the context of submission, it updates the held record, or creates a new one. This turns upon the assumption that only one outcome is possible: a submission error, or a callback, but not both. Fixing this adds more state into usbmon and thus makes it less transparent, so I decided to go with confusing definition of 'S', 'C', 'E', but have less bugs in the implementation. Currently, either 'E' or 'C' always happen, but you do not know which one at the time 'S' is reported. -- Pete ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel