9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Charles Forsyth <forsyth@terzarima.net>
To: 9fans@cse.psu.edu
Subject: Re: usbd - revision (Was: [9fans] USB developments)
Date: Thu, 15 Jan 2004 20:24:12 +0000	[thread overview]
Message-ID: <df3c7a48abb63a404dafb0ae5aba68ae@terzarima.net> (raw)
In-Reply-To: <20040115211012.K25947@cackle.proxima.alt.za>

>>Let's see if our paths will cross.  Kernel enumerates based on
>>notification (an interrupt, perhaps?) that the structure has changed.
>>Am I reading the spec right that enumeration is the only way to
>>determine the structure and that it should occur frequently?  That's
>>certainly what it sounds like, I'm assuming that instead of polling
>>one can wait for interrupts, but whichever applies, the code is no
>>doubt in the existing driver code already as there is nothing optional
>>about it.

no.  in UHCI you can get interrupts for the notional `root hub' but
that's because it's notional.  it's not a USB hub.  you can't talk to
it as though it's a USB hub.  there are some strange registers.
otherwise, for a real hub, you must periodically
use a USB transaction on the hub's control endpoint to poll for changes
to the status of its ports.  there is no code in the existing driver to
poll, but that's precisely because it leaves that to usbd, which anyway
needs to poll for other changes in configuration.

you need the tree structure because that reflects the physical connection
structure.  when a hub goes, it takes all the connections through it,
including directly-connected devices, other hubs, their devices, and so on.

i just don't see why it's so important to you that the kernel enumerate
(if it doesn't configure, and if it does configure, it needs to know much
more about the class, and since classes are often 0, the device).

>>or serial numbers etc. becomes too painful.  Keep in mind that XP
>>deals with it, why shouldn't Plan 9?

because many manufacturers write special USB drivers that
deal with the peculiar/proprietary protocol used by their device!
it's no different in that regard from VGA (or VESA)

>>believe that brocee's work should be reconsidered.  Specially if

it has been, but that's not really a key to this discussion.
it might indeed be useful to load USB-device-specific modules into
the kernel, in the same way that Etherif components might be loaded,
but that doesn't seem to me to be the determining aspect.

the naming problem isn't that usb1/2/ep3data (say) is a funny name:
at that level it's as good as any other existing one (eg, eia0, sdD0).
the trouble is that for hardwired devices,
it's not too bad to name them by physical
connection (and that's to some extent unambiguous), since it's
long-lived enough to associate with some higher-level notion
(eg, my printer is on lpt0), but
for dynamically-connected devices, the physical connection name
is still unambiguous, but much less useful, since the printer
now is usb0/3/ep2data but in a little while it's usb1/2/ep2data,
depending on which USB slot on my thinkpad i chose.
(in fact, for USB it's worse because the /2/ and /3/ there are
dynamically assigned and unpredictable.)

that's possibly where a link to (something like) plumbing might
be relevant because it might be adequate to be able to say
`if there's a printer on the USB bus, that's the one' or even
`if there's an HP printer, that's the laser printer, but
if there's an Epson that's the photo printer'.



  reply	other threads:[~2004-01-15 20:24 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-15  6:16 [9fans] USB developments Lucio De Re
2004-01-15  8:23 ` Fco.J.Ballesteros
2004-01-15  8:42   ` Lucio De Re
2004-01-15  9:13     ` Fco.J.Ballesteros
2004-01-15  9:17       ` Fco.J.Ballesteros
2004-01-15 10:05       ` Lucio De Re
2004-01-15 10:23         ` Fco.J.Ballesteros
2004-01-15 13:02         ` Lucio De Re
2004-01-15 14:05           ` Richard Miller
2004-01-15 14:44             ` Lucio De Re
2004-01-15 14:56               ` Fco.J.Ballesteros
2004-01-15 15:20                 ` Lucio De Re
2004-01-15 15:41                   ` Fco.J.Ballesteros
2004-01-15 14:53             ` Fco.J.Ballesteros
2004-01-15 21:25             ` Dan Cross
2004-01-15 10:30       ` usbd - revision (Was: [9fans] USB developments) Lucio De Re
2004-01-15 10:46         ` Fco.J.Ballesteros
2004-01-15 11:47           ` Lucio De Re
2004-01-15 12:11             ` Charles Forsyth
2004-01-15 12:43               ` Lucio De Re
2004-01-15 18:01                 ` C H Forsyth
2004-01-15 19:10                   ` Lucio De Re
2004-01-15 20:24                     ` Charles Forsyth [this message]
2004-01-15 21:00                       ` Micah Stetson
2004-01-16  6:18                       ` Lucio De Re
2004-01-16  7:34                     ` Fco.J.Ballesteros
2004-01-16  7:38                     ` Fco.J.Ballesteros
2004-01-16  7:59                       ` Lucio De Re
2004-01-16 10:23                       ` Bruce Ellis
2004-01-16 10:32                         ` Lucio De Re
2004-01-16 10:39                           ` boyd, rounin
2004-01-16 10:45                           ` Richard Miller
2004-01-16 11:41                             ` Bruce Ellis
2004-01-16 11:50                               ` rog
2004-01-15  9:07   ` [9fans] USB developments Charles Forsyth
2004-01-15  9:18     ` Fco.J.Ballesteros
2004-01-15 10:39     ` Lucio De Re
2004-01-15 10:48       ` Richard Miller
2004-01-15  9:10 ` Richard Miller
2004-01-15  9:14   ` Fco.J.Ballesteros
2004-01-16  9:59 ` boyd, rounin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=df3c7a48abb63a404dafb0ae5aba68ae@terzarima.net \
    --to=forsyth@terzarima.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).