Hello David

> You should have tried 76 _columns_ or _characters_ instead;
> that didn't improve anything.

I meant 76 characters. Anyway, I suspect my mail server is overriding
the mail client options. I have switched to new mailer which I hope will
do line wrap correctly. Do let me know if you can read my response.

> That was the ring head QH, which gets skipped over by the code
> used to dump that list. You sent it in an earlier message:

Oh.. I did not realize that ring head is skipped by the walkthrough
code. Earlier I posted a question concerning the qh_next field and
apparently it was overlooked. Anyway as I understand now, the ring head
provides the host controller view and the qh_next field the cpu view .
After dumping the ring head(given below), I can confirm that the H bit
in dword1 is indeed 1.  The ring head output is followed by output from
show_async()

ring head begin 
vox160-ehci-hcd vox160-ehci-hcd.0: rh qh a1614000 n01614102 info 8000 0
cq 0 nq 1 aq 160f000 t 40
ring head end 

qh/a1614100 dev2 hs ep1 02002102 40000000 (80008c01 data1 nak0)
  a160f120 out len=512 02008c80 urb 8147e6e0

dword1 is ring head is 0x8000 indicating H bit is set but all the other
fields like endpoint number,device address are zeroed out. Is that ok ?

The current qtd pointer is null. The alternate qtd pointer is filled up
owing to OUT 31 bytes short packet which was NYETed and i hope that the
physical address 0x160f000 would correspond to virtual address
0xa160f120 of qtd. The token field is 0x40 indicating that the halted
bit is set. Apparently the host controller is halted for some reason. is
that fair to assume ? On the other hand, the contents of status and
command register given below indicates that the HC is not halted.

status 8008 Async FLR
command 010029 (park)=0 ithresh=1 Async period=256 RUN

The status and command register do not agree with data from queue head.
Obviously there is a disconnect or may be I did not correlate the data
correctly. What is your comment ?

Regards
Vivek
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of David Brownell
> Sent: Monday, July 10, 2006 3:55 PM
> To: Vivek Dharmadhikari
> Cc: linux-usb-devel@lists.sourceforge.net
> Subject: Re: [linux-usb-devel] decoding qh and qtds
> 
> On Monday 10 July 2006 3:21 pm, Vivek Dharmadhikari wrote:
> > David
> > 
> > I have configured the mailer to wrap after 76 lines. 
> 
> You should have tried 76 _columns_ or _characters_ instead; 
> that didn't improve anything.
> 
> > Hope my response is readable now. Please let me know. 
> 
> > I said I was expecting two queue heads because I could spot one qh 
> > with one qtd linked to it as is given below. Note that the qhs are 
> > dumped after expiry of scsi 30 seconds timer.
> 
> Right, only one _active_ QH, then there's also the ring head 
> which does not get dumped ...
> 
>  
> > qh/a1610100 dev2 hs ep1 42002102 40000000 (80008c01 data1 nak4)
> >    a1595120 out len=512 02008c80 urb 81612500
> > 
> > But in the above qh, the H bit in dword1 0x42002102 is off. 
> So I was 
> > hoping that there would be one more qh with H bit set to 1(per ehci 
> > spec) and linked to above qh. Is my interpretation correct ?
> 
> That was the ring head QH, which gets skipped over by the 
> code used to dump that list.  You sent it in an earlier message:
> 
> > >         qh = ehci->async->qh_next.qh;
> 
> The "ehci->async" QH gets skipped, and it's got the H bit set.
> 
> 
> > As i see only one qh with H bit off and there are no active 
> or empty 
> > qh attached to it, i think the driver possibly removed 
> unused/retired 
> > qh with H-bit set to 1
> > which tends to confuse the host controller. is that possible ?      
> 
> I think you're likely the confused entity, because you 
> weren't dumping the node with the H bit set.
> 
> 
> > As regards using bus_to_virt(), thanks for pointing out that it is 
> > deprecated. But then how to unmap the bus address to virtual for qh 
> > walkthrough ?
> 
> You don't do that.  You keep a CPU view tree and walk that; 
> the DMA addresses are only used to stuff fields used by the hardware.
> 
> - Dave
> 
> 
> > 
> > Thanks.
> > 
> > Regards
> > Vivek
> > 
> > 
> > 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of 
> > David Brownell
> > Sent: Saturday, July 08, 2006 10:54 AM
> > To: Vivek Dharmadhikari
> > Cc: linux-usb-devel@lists.sourceforge.net
> > Subject: Re: [linux-usb-devel] decoding qh and qtds
> > 
> > 
> > On Friday 07 July 2006 6:16 pm, Vivek Dharmadhikari wrote:
> > > Hello David
> > > 
> > > I posted earlier questions regarding the scanning of qhs and is 
> > > reproduced below
> > 
> > Is your mailer not capable of wrapping lines correctly?
> > 
> > 
> > > I used the standard idiom like below to dump all the qh and qtds.
> > > 
> > >         qh = ehci->async->qh_next.qh;
> > >         if(qh)
> > >         {
> > >                 do {
> > >                         dbg_qh ("ehci-hcd",ehci, qh);
> > >                         qh = qh->qh_next.qh;
> > >                 } while (qh);
> > >         }
> > > 
> > > I do the above after the expiry of 30 seconds scsi timer and i 
> > > always see that there is only one queue head in the list 
> where as i 
> > > was expecting at least two queue head.
> > 
> > And you expected two of them ... why?  From what you had 
> said before, 
> > only one QH would be active, so that's the only one I'd 
> expect to see.
> > 
> > 
> > > After reading the code, i think only active qh and its associated 
> > > qtds are shown. If a qh has no qtd,then above code 
> fragment won't produce all
> > > the qhs. Is this observation correct ?    
> > 
> > There's always a head, and otherwise the only way an empty qh (no 
> > qtds) will be scheduled is if it's about to be removed.  An 
> empty qh 
> > is shown, but it won't have any qtds.
> > 
> > 
> > 
> > > Alternately, I tried to dump all the qhs by doing something like 
> > > below
> > > 
> > > addr = readl(&ehci->regs->async_next); addr = 
> le32_to_cpu(addr); /* 
> > > My system is big endian */ qh = (struct ehci_qh 
> *)bus_to_virt(addr);
> > 
> > Two things wrong there.  (a) the low bits of that pointer 
> are used as 
> > hardware type codes, so you need to mask them off; and
> > (b) bus_to_virt() is deprecated for all kinds of good 
> reasons, don't 
> > use it.
> > 
> > 
> > > dbg_qh ("ehci-hcd",ehci, (struct ehci_qh *)qh);
> > > 
> > > addr = le32_to_cpu(qh->hw_next);
> > > qh = (struct ehci_qh *)bus_to_virt(addr);
> > 
> > Same things again.
> > 
> > 
> > > dbg_qh ("ehci-hcd",ehci, (struct ehci_qh *)qh);
> > > 
> > > The dword1 which contains RL,H,Device Address etc fields obtained 
> > > using above code fragment contained wrong values. 
> Obviously i did something wrong above.
> > 
> > What makes you think they are wrong?  That should give you 
> a big clue...
> > 
> > 
> > > What am i missing here ? What is the correct way to dump 
> all qhs either ?
> > 
> > The correct way is to use the C data structures, and walk 
> them using 
> > normal CPU virtual addresses.  If you're paranoid, double 
> check them 
> > as you walk, to make sure the views from the CPU and the controller 
> > are exactly in sync while you walk the data structures.
> > 
> > - Dave
> > 
> > 
> > Using Tomcat but need to do more? Need to support web 
> services, security?
> > Get stuff done quickly with pre-integrated technology to 
> make your job 
> > easier Download IBM WebSphere Application Server v.1.0.1 based on 
> > Apache Geronimo
> > 
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216
> > 42 _______________________________________________
> > linux-usb-devel@lists.sourceforge.net
> > To unsubscribe, use the last form field at:
> > https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
> > 
> 
> 
> --------------------------------------------------------------
> -----------
> Using Tomcat but need to do more? Need to support web 
> services, security?
> Get stuff done quickly with pre-integrated technology to make 
> your job easier Download IBM WebSphere Application Server 
> v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
dat=121642
> _______________________________________________
> linux-usb-devel@lists.sourceforge.net
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
> 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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