9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Lucio De Re <lucio@proxima.alt.za>
To: 9fans@cse.psu.edu
Subject: Re: usbd - revision (Was: [9fans] USB developments)
Date: Fri, 16 Jan 2004 08:18:25 +0200	[thread overview]
Message-ID: <20040116081824.L25947@cackle.proxima.alt.za> (raw)
In-Reply-To: <df3c7a48abb63a404dafb0ae5aba68ae@terzarima.net>; from Charles Forsyth on Thu, Jan 15, 2004 at 08:24:12PM +0000

On Thu, Jan 15, 2004 at 08:24:12PM +0000, Charles Forsyth wrote:
> 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.
>
I assumed polling would best be a kernel function, but I can see
that there are different views.  I'll go along with usbd doing it,
it seems most appropriate here.

> 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 have to agree.  My assumption was that usbd would do that, on #U
reporting that there has been a change.  You make a very strong case
for it not working.

> 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).
>
I'm not sure why it was so important, but it may come back and bite
me.  Still, your arguments are presently unassailable.

> >>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)
>
No, no, no.  I'm thinking USB here, not function.  I suppose there
may be hubs that are also broken, but these are all special cases,
they mustn't get mixed up in the minestrone.  My beef is that I
want the bus management to match the specs as accurately as possible,
on the assumption that the bus is OK.  Device drivers, quirks and
databases will handle functions and all their foibles.  It should
not be necessary to alter the bus drivers to deal with them, except
perhaps to implement the quirk - but at least it's then a few
generic operations, not a mass of special cases.

> >>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.
>
See, you agree with me :-)

> ... 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.)
>
Yep, a point I could have made, had I thought things out instead
of shooting from the hip.  Again, the database should contain enough
information to give various devices sensible prefixes or suffixes
and the daemon can assign them instance indices which might suffice.
A naming scheme is nothing more than a naming scheme, /lib/ndb can
deal with local conventions.

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

Plan 9 is a little too tightly coupled to its conventions, but I'm
sure the naming scheme will soon settle into something workable
for most and flexible enough for the few exceptions to be managed.

++L


  parent reply	other threads:[~2004-01-16  6:18 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
2004-01-15 21:00                       ` Micah Stetson
2004-01-16  6:18                       ` Lucio De Re [this message]
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=20040116081824.L25947@cackle.proxima.alt.za \
    --to=lucio@proxima.alt.za \
    --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).