Re: [linux-usb] Re: USB device allocation

Martin Dalecki (dalecki@cs.net.pl)
Fri, 08 Oct 1999 20:47:37 +0200


David Waite wrote:
>
> > If the bus has to be probed periodically, it can be triggered in
> > userspace.
> > I am not aware how this currently happens. USB/PCMCIA folks help here?
>
> I believe on USB the hub driver does this, although I am not sure. I believe
> it is the purpose of a 1 time/second interrupt, to probe for new hardware.
>
> I see something like this (although I am whipping up an idea here off the
> top of my head, so it will probably have major flaws):
>
> 1. Device gets added/removed
> 2. hardware driver gets notified, now knows to give file errors on
> read/write.
> 3. userspace daemon is notified, removes file link.
>
> on (re)insertion is more difficult:
> 1. hardware driver gets notified, processes any device info and tries to see
> if there is a unique serial number.
> 2. device is temporarily mapped as a new device
> 2. driver notifies userspace daemon
> 3. userspace daemon processes configuration, decides if the device should be
> considered the same as a previous device
> 4. device is either re-added (read/write work again), or left as a new
> device.
> 5. userspace daemon adds file link
>
> -David Waite

I don't get it: what of this all couldn't be done entierly in user
space?
(With the same severe races involved.....)

--Marcin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/