From: David Brownell <[EMAIL PROTECTED]>
To: fengwei yin <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [linux-usb-devel] get hub port status on big endian board
Date: Tue, 18 May 2004 06:26:03 -0700

fengwei yin wrote:
I need guidance About the TD queue processing.

Let me take usb_set_address as example.

Before TD queue processing,the TD queue as following:
                                    TailP
                                     |
                                     |
                                     V
HeadP---->dummy TD------>td[0]------>td[1]

Erm, no. It should be

  HeadP -> td[0]/SETUP -> td[1]/STATUS -> dummy
  TailP -> dummy


kernel 2.4.x Sorry,I can't find where HeadP is set to td[0].

In function ep_add_ed:
td = td_alloc (ohci, SLAB_ATOMIC);
...
ed->hwTailP = cpu_to_le32 (td->td_dma);
ed->hwHeadP = ed->hwTailP;


Before queue processing,never touch ed->HeadP.
So I think ed->HeadP --> dummy.

In function td_fill:
  td_pt = urb_priv->td [index];
  td_pt->hwNextTD = 0;

td_fill will be called with index=0,1(td[0],td[1]).
When index=1,td[1]->Next=0.
So I think td[1] is the last element of list.


After TD queue processing,the queue as following:

HccaDoneHead---->td[0]----->dummy TD

Then

  HeadP -> dummy
  TailP -> dummy

which is to say, an empty queue.  And if no other endpoint
was working, the donelist would be

  hcca DoneHead -> td[1] -> td[0] -> NULL

Which is why the donelist gets reversed (to td[0] then td[1])
before it's processed.

- Dave


Regards
yfw

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com




-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to