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: Thu, 15 Jan 2004 14:43:43 +0200	[thread overview]
Message-ID: <20040115144342.G25947@cackle.proxima.alt.za> (raw)
In-Reply-To: <4cba074ff1f8f3d1e1270f4f67fbe065@terzarima.net>; from Charles Forsyth on Thu, Jan 15, 2004 at 12:11:38PM +0000

On Thu, Jan 15, 2004 at 12:11:38PM +0000, Charles Forsyth wrote:
>
> certainly before writing the original devusb.c,

Probably no one better qualified than you for that purpose :-)

> my impression on inspecting the mess that was USB
> implementation in other systems is that one ended up with
> a fair number of little drivers in the kernel to handle the
> peculiar dances required for each new (or broken) device.

Which is why my first thoughts were that we ought to take a peek
at brucee's work in connection with LKMs.  But we don't have to,
we can certainly interchange kernel and userland top-halfs, in my
opinion.  I gave my reasons elsewhere, but to recap, the kernel
doesn't have much greater authority than eve, so as long as eve
owns the drivers, they'll work fine except for some context switching
costs.

Still, brucee, any reason why your work is still languishing unused?

> for instance, i fail to see why talking to a Palm on USB
> should need anything in the kernel, but there it is in other systems.

Well, let's not put it in there, we get a choice, don't we?  And
we can use others' bad experiences to save ourselves blood, ssweat
and tears.

> i therefore deliberately put enumeration outside the kernel because it is (potentially)
> non-trivial and recursive (so is PCI enumeration but it has
> rather less to do, placing less of a strain on KSTACK).
>
But no more than seven deep, or is that five?  Surely we can cope?
Much more importantly, how complex is enumeration as such?  In my
extremely limited understanding, it merely needs to return (assign,
in fact) the ID of the device, its type and whether it connected
or disconnected.  And, no, I'm not sure :-)  I'm asking.  Worse,
I'm hoping.  But of course I can "just try it".

> i still think a kernel would need to interact
> with a configurable user-level process (or processes) to do
> enumeration properly in general.  the state required to do that

Well, not what you have in mind, but if usbd reads the ctl or stat
or enum file (whatever you need to call it) and configures and
initialises each device in turn (and may or may not do something
with those that have disappeared, I'm not sure whether they need
reporting by #U or can just be detected by their absence, something
probably needs to be done about them at usbd/user level), then #U
needs to do only what it knows about, which is hopefully very
little, let's call it identification and someone (me?) can document
what it should consist of.

> seemed to be split between kernel and process, which seemed
> clumsy, compared to putting it all in user-mode.
>
I ought to take your word for it, but I won't: you don't sound
convinced enough.  Now if rob or jmk were saying the same in their
somewhat very final style, I would just go hide in my corner :-)

> that code still seems to me to belong beyond the `much-needed gap'.

Flesh this out a a bit for fools like me (if there are any), please!

++L


  reply	other threads:[~2004-01-15 12:43 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 [this message]
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
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=20040115144342.G25947@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).