9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] usb ohci - one more question
@ 2011-02-22 17:02 rod
  2011-02-22 17:17 ` Francisco J Ballesteros
  0 siblings, 1 reply; 5+ messages in thread
From: rod @ 2011-02-22 17:02 UTC (permalink / raw)
  To: 9fans

May I have one more question?

When you create a new bulk or interrupt endpoint "epopen" is called.
The aux field of the Ep is set to point to an array of two Qio
structures. One for input and one for output. Both of those in turn
have a pointer to, and a one-to-one correspondence with, an endpoint
descriptor (Ed). "newed" is called for each Qio to link the Qio's
endpoint descriptor into the controller's chain.

I can't figure out why there are two Qio structs. The usb spec says
that bulk/interrupt endpoints are unidirectional, so why wouldn't just
a single one do?

Thanks,

rod



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] usb ohci - one more question
  2011-02-22 17:02 [9fans] usb ohci - one more question rod
@ 2011-02-22 17:17 ` Francisco J Ballesteros
  2011-02-22 17:29   ` Richard Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Francisco J Ballesteros @ 2011-02-22 17:17 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

We don't follow the spec that close. I think linux calls this pipes,
but I'm not sure now. In any case, IIRC, we could do I/O on
those eps [but I'm kind of sleepy now and don't have the code at hand,
so don't trust me too much on this; I can double check later if you
want me to do that.]

On the other hand, there are so many ep types and transfer types,
that it looks easier to follow the same pattern for I/O on all eps, duplex
or not (note that the std would call each simplex chan an "endpoint", but
you can pair two of them and consider them an endpoint when they are duplex).

On Tue, Feb 22, 2011 at 6:02 PM,  <rod@hemiola.co.uk> wrote:
> May I have one more question?
>
> When you create a new bulk or interrupt endpoint "epopen" is called.
> The aux field of the Ep is set to point to an array of two Qio
> structures. One for input and one for output. Both of those in turn
> have a pointer to, and a one-to-one correspondence with, an endpoint
> descriptor (Ed). "newed" is called for each Qio to link the Qio's
> endpoint descriptor into the controller's chain.
>
> I can't figure out why there are two Qio structs. The usb spec says
> that bulk/interrupt endpoints are unidirectional, so why wouldn't just
> a single one do?
>
> Thanks,
>
> rod
>
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] usb ohci - one more question
  2011-02-22 17:17 ` Francisco J Ballesteros
@ 2011-02-22 17:29   ` Richard Miller
  2011-02-22 17:39     ` rod
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Miller @ 2011-02-22 17:29 UTC (permalink / raw)
  To: 9fans

> (note that the std would call each simplex chan an "endpoint", but
> you can pair two of them and consider them an endpoint when they are duplex)

As an example, I have a usb device which presents both an input
endpoint #2 and an output endpoint #2.  The standard would treat these
as separate endpoints which have the same endpoint number.  The Plan 9
driver treats them (sensibly I think) as a single bidirectional endpoint.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] usb ohci - one more question
  2011-02-22 17:29   ` Richard Miller
@ 2011-02-22 17:39     ` rod
  2011-02-22 18:56       ` Francisco J Ballesteros
  0 siblings, 1 reply; 5+ messages in thread
From: rod @ 2011-02-22 17:39 UTC (permalink / raw)
  To: 9fans


>presents both an input endpoint #2 and an output endpoint #2

Ah, thanks. I wasn't aware that 2 endpoints could have the same number
and be distinct only in their data direction. All of the 20 or so
different "sticks" on my desk have separate endpoint numbers.

rod



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] usb ohci - one more question
  2011-02-22 17:39     ` rod
@ 2011-02-22 18:56       ` Francisco J Ballesteros
  0 siblings, 0 replies; 5+ messages in thread
From: Francisco J Ballesteros @ 2011-02-22 18:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Beware that numbers as shown by plan 9 might not be those shown by linux, for
example. In any case, it can differ for different devices, although most of them
look the same if they are of the same kind.

On Tue, Feb 22, 2011 at 6:39 PM,  <rod@hemiola.co.uk> wrote:
>
>>presents both an input endpoint #2 and an output endpoint #2
>
> Ah, thanks. I wasn't aware that 2 endpoints could have the same number
> and be distinct only in their data direction. All of the 20 or so
> different "sticks" on my desk have separate endpoint numbers.
>
> rod
>
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-22 18:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-22 17:02 [9fans] usb ohci - one more question rod
2011-02-22 17:17 ` Francisco J Ballesteros
2011-02-22 17:29   ` Richard Miller
2011-02-22 17:39     ` rod
2011-02-22 18:56       ` Francisco J Ballesteros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).