9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] usb vid/did
@ 2011-01-07 13:12 erik quanstrom
  2011-01-07 14:28 ` Nemo
  0 siblings, 1 reply; 7+ messages in thread
From: erik quanstrom @ 2011-01-07 13:12 UTC (permalink / raw)
  To: 9fans

it doesn't seem to be available in anyone's control files.

usb(3) says

        This may result from the read of an endpoint control file:

               (the first line is wrapped to make it fit here)
               enabled control rw speed full maxpkt 64 pollival 0
                    samplesz 0 hz 0 hub 1 port 3 busy
               storage csp 0x500608 vid 0x951 did 0x1613 Kingston 'DT 101 II'

yet my endpoints never have a vid nor a did.

kw# grep . */ctl
ep1.0/ctl:enabled control rw speed high maxpkt 64 pollival 0 samplesz 0 hz 0 hub 0 port 0 busy
ep1.0/ctl:roothub csp 0x000009 ports 1 ehci
ep2.0/ctl:enabled control rw speed high maxpkt 64 pollival 0 samplesz 0 hz 0 hub 1 port 1 busy
ep2.0/ctl:hub csp 0x020009 ports 7 none <nil> ehci
ep3.0/ctl:enabled control rw speed full maxpkt 8 pollival 0 samplesz 0 hz 0 hub 2 port 2 busy
ep3.0/ctl:hub csp 0x000009 ports 3 'Mitsumi Electric' 'Hub in Apple Extended USB Keyboard' ehci

a little grep-o-matic indicates this is just the way it goes.
is this an oversite, or does usb(3) just not have that information?

if not, usbd(4) does have that information.  are there any problems
with adding it and correcting the man page?

- erik



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

* Re: [9fans] usb vid/did
  2011-01-07 13:12 [9fans] usb vid/did erik quanstrom
@ 2011-01-07 14:28 ` Nemo
  2011-01-07 15:36   ` Gorka Guardiola
  0 siblings, 1 reply; 7+ messages in thread
From: Nemo @ 2011-01-07 14:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

i think usbd added that. 
iirc it should do it. I'll take a look anyway. maybe the code was gone
in some change...

On Jan 7, 2011, at 2:12 PM, erik quanstrom <quanstro@quanstro.net> wrote:

> it doesn't seem to be available in anyone's control files.
> 
> usb(3) says
> 
>        This may result from the read of an endpoint control file:
> 
>               (the first line is wrapped to make it fit here)
>               enabled control rw speed full maxpkt 64 pollival 0
>                    samplesz 0 hz 0 hub 1 port 3 busy
>               storage csp 0x500608 vid 0x951 did 0x1613 Kingston 'DT 101 II'
> 
> yet my endpoints never have a vid nor a did.
> 
> kw# grep . */ctl
> ep1.0/ctl:enabled control rw speed high maxpkt 64 pollival 0 samplesz 0 hz 0 hub 0 port 0 busy
> ep1.0/ctl:roothub csp 0x000009 ports 1 ehci
> ep2.0/ctl:enabled control rw speed high maxpkt 64 pollival 0 samplesz 0 hz 0 hub 1 port 1 busy
> ep2.0/ctl:hub csp 0x020009 ports 7 none <nil> ehci
> ep3.0/ctl:enabled control rw speed full maxpkt 8 pollival 0 samplesz 0 hz 0 hub 2 port 2 busy
> ep3.0/ctl:hub csp 0x000009 ports 3 'Mitsumi Electric' 'Hub in Apple Extended USB Keyboard' ehci
> 
> a little grep-o-matic indicates this is just the way it goes.
> is this an oversite, or does usb(3) just not have that information?
> 
> if not, usbd(4) does have that information.  are there any problems
> with adding it and correcting the man page?
> 
> - erik
> 



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

* Re: [9fans] usb vid/did
  2011-01-07 14:28 ` Nemo
@ 2011-01-07 15:36   ` Gorka Guardiola
  2011-01-07 15:59     ` erik quanstrom
  0 siblings, 1 reply; 7+ messages in thread
From: Gorka Guardiola @ 2011-01-07 15:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I do see vids/dids just not for hubs.

-
Curiosity sKilled the cat

G.

On Jan 7, 2011, at 3:28 PM, Nemo <nemo.mbox@gmail.com> wrote:

> i think usbd added that. 
> iirc it should do it. I'll take a look anyway. maybe the code was gone
> in some change...
> 
> On Jan 7, 2011, at 2:12 PM, erik quanstrom <quanstro@quanstro.net> wrote:
> 
>> it doesn't seem to be available in anyone's control files.
>> 
>> usb(3) says
>> 
>>       This may result from the read of an endpoint control file:
>> 
>>              (the first line is wrapped to make it fit here)
>>              enabled control rw speed full maxpkt 64 pollival 0
>>                   samplesz 0 hz 0 hub 1 port 3 busy
>>              storage csp 0x500608 vid 0x951 did 0x1613 Kingston 'DT 101 II'
>> 
>> yet my endpoints never have a vid nor a did.
>> 
>> kw# grep . */ctl
>> ep1.0/ctl:enabled control rw speed high maxpkt 64 pollival 0 samplesz 0 hz 0 hub 0 port 0 busy
>> ep1.0/ctl:roothub csp 0x000009 ports 1 ehci
>> ep2.0/ctl:enabled control rw speed high maxpkt 64 pollival 0 samplesz 0 hz 0 hub 1 port 1 busy
>> ep2.0/ctl:hub csp 0x020009 ports 7 none <nil> ehci
>> ep3.0/ctl:enabled control rw speed full maxpkt 8 pollival 0 samplesz 0 hz 0 hub 2 port 2 busy
>> ep3.0/ctl:hub csp 0x000009 ports 3 'Mitsumi Electric' 'Hub in Apple Extended USB Keyboard' ehci
>> 
>> a little grep-o-matic indicates this is just the way it goes.
>> is this an oversite, or does usb(3) just not have that information?
>> 
>> if not, usbd(4) does have that information.  are there any problems
>> with adding it and correcting the man page?
>> 
>> - erik
>> 
> 



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

* Re: [9fans] usb vid/did
  2011-01-07 15:36   ` Gorka Guardiola
@ 2011-01-07 15:59     ` erik quanstrom
  2011-01-07 16:48       ` Francisco J Ballesteros
  0 siblings, 1 reply; 7+ messages in thread
From: erik quanstrom @ 2011-01-07 15:59 UTC (permalink / raw)
  To: 9fans

>> ep3.0/ctl:hub csp 0x000009 ports 3 'Mitsumi Electric' 'Hub in Apple Extended USB Keyboard' ehci

>I do see vids/dids just not for hubs.

perhaps i misunderstand what is ment by a "root hub".
i thought that ment that it was a hub that usb(3) invented.
a hub in a keyboard can't be a root hub, can it?

- erik



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

* Re: [9fans] usb vid/did
  2011-01-07 15:59     ` erik quanstrom
@ 2011-01-07 16:48       ` Francisco J Ballesteros
  2011-01-07 16:52         ` erik quanstrom
  0 siblings, 1 reply; 7+ messages in thread
From: Francisco J Ballesteros @ 2011-01-07 16:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Ah.
A root hub is an invention of the usb std.
There's no such thing. It's the controller.
It can be that usbd does not write vid/did for root hubs, perhaps.

I've not seen a root hub in a keyboard. If it's a usb keyboard, it can't be
a root hub, because you have to plug the kbd into a port, which
belongs to a hub,
root or not.

On Fri, Jan 7, 2011 at 4:59 PM, erik quanstrom <quanstro@labs.coraid.com> wrote:
>>> ep3.0/ctl:hub csp 0x000009 ports 3 'Mitsumi Electric' 'Hub in Apple Extended USB Keyboard' ehci
>
>>I do see vids/dids just not for hubs.
>
> perhaps i misunderstand what is ment by a "root hub".
> i thought that ment that it was a hub that usb(3) invented.
> a hub in a keyboard can't be a root hub, can it?
>
> - erik
>
>



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

* Re: [9fans] usb vid/did
  2011-01-07 16:48       ` Francisco J Ballesteros
@ 2011-01-07 16:52         ` erik quanstrom
  2011-01-07 17:21           ` Gorka Guardiola
  0 siblings, 1 reply; 7+ messages in thread
From: erik quanstrom @ 2011-01-07 16:52 UTC (permalink / raw)
  To: 9fans

On Fri Jan  7 11:51:23 EST 2011, nemo@lsub.org wrote:
> Ah.
> A root hub is an invention of the usb std.
> There's no such thing. It's the controller.
> It can be that usbd does not write vid/did for root hubs, perhaps.
>
> I've not seen a root hub in a keyboard. If it's a usb keyboard, it can't be
> a root hub, because you have to plug the kbd into a port, which
> belongs to a hub,
> root or not.

okay, so there's some sort of bug.  what kind of output
would you like.  this is for the kw ehci.

- erik



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

* Re: [9fans] usb vid/did
  2011-01-07 16:52         ` erik quanstrom
@ 2011-01-07 17:21           ` Gorka Guardiola
  0 siblings, 0 replies; 7+ messages in thread
From: Gorka Guardiola @ 2011-01-07 17:21 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, Jan 7, 2011 at 5:52 PM, erik quanstrom <quanstro@labs.coraid.com> wrote:
> okay, so there's some sort of bug.  what kind of output
> would you like.  this is for the kw ehci.
>

Hmm, if it is a bug it is on purpose I think. You are right
it could probably change to show vid/did.

All is started by startdev in
/sys/src/cmd/usb/usbd/usbd.c:224

Devices have their info written by
writeinfo()
/sys/src/cmd/usb/usbd/dev.c:217

Hubs (root or not) have their info written by usbd in newhub()
/sys/src/cmd/usb/usbd/usbd.c:177

Hubs all have the same format. As root hubs are invented,
they don't have vid/did, so plain hubs don't either to have the same format.
The vid/did can be added  and to make the string
similar maybe the vid/did for roohubs can be set to 0xffff/0xffff or something.

You only have to change the info strings of newhub to be more like
the ones in writeinfo and see if anything breaks (I don't think it
should but...).

HTH
G.



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

end of thread, other threads:[~2011-01-07 17:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-07 13:12 [9fans] usb vid/did erik quanstrom
2011-01-07 14:28 ` Nemo
2011-01-07 15:36   ` Gorka Guardiola
2011-01-07 15:59     ` erik quanstrom
2011-01-07 16:48       ` Francisco J Ballesteros
2011-01-07 16:52         ` erik quanstrom
2011-01-07 17:21           ` Gorka Guardiola

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).