On Tue, 24 Jul 2007, Ron Gage wrote:

> > Don't you remember what I told you a few days ago?  The setup packet 
> > contents in the "down" report are unreliable.  You need to look at an 
> > "up" report.
> >
> > Alan Stern
> >
> >   
> I remember it quite clearly.  You told me to look at the "UP" packets 
> which I did.

No, I said to look at the "up" _reports_.  "report" != "packet".

>  I then responded about how those "UP" packets looked like 
> responses from the device to the host (a clear example: the response to 
> the Get_Descriptor_From_Device request is in an UP packet. 

For IN transfers (from the device to the host), yes, the transfer data 
is displayed in the "up" report.  For OUT transfers (host to device) 
the transfer data is displayed in the "down" report.  For control 
transfers, both reports contain a section labelled "Setup packet" but 
the values in the "down" report are wrong.

> In fact, by looking over the entire capture session of 2,324 packets, I 
> am seeing 9 packets so far that are UP packets and appear to be from 
> host to device.  All 9 of these UP packets are at the beginning of the 
> capture.  In fact, after sequence #19, there are no UP packets that 
> appear to originate from the host at all - but there are hundreds of 
> down packets that appear to.
> 
> 
> As I said before, I'm getting confused.

First, stop thinking of those reports are packets.  They aren't.  They
aren't even URBs, since each URB corresponds to a pair of reports: one
"down" and one "up".  The URB numbers are clearly listed in the log.

I downloaded your log file.  It contains 1162 URBs (numbered 1 through
1162).  Each URB has two reports (a report appears a single line in the
unexpanded view), a "down" followed by an "up".  What could be clearer
than that?

(Stop thinking about packets.  The log doesn't list individual packets, 
and you wouldn't be interested in them if it did.  A single control URB 
typically consists of 9 packets; some have more and some have fewer.)

As for the direction of data transfers, it's easy to tell.  Transfers 
from the host to the device are labelled "out" in the log.  Transfers 
from the device to the hoset are labelled "in".

So for example, URB #10 has two lines in the log.  The first is
labelled "10 in down" and the second is labelled "10 in up".  If you
expand the second you will see the data sent by the device together
with the correct Setup packet contents.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to