hello,

        I am still working on the user-mode linux HCD. Currently it is running rather 
stable. I can use it
to get the speedtouch modem synced. (thus using usbdevfs over the uml hcd over 
usbdevfs again to my
ohci) This means control requests and about 250k on bulk firmware download. (If anyone 
is
interested, I can make a patch.)

I would like to talk about the included hub simulation. Because the hub driver is 
needed for basic
usb support and it is thus present in the host AND uml kernel, this poses problems. I 
have written a
basic hub simulation to overcome this. This is included in the uml hcd because I do 
not want to
touch the linux-usb code.

The current implementation scans the /proc/bus/usb/ directory for device entries. (I 
believe this
can be replaced with a trigger on a certain file? /proc/bus/usb/devices?) When it 
detects a new
device, the hub interrupt is completed and the hub driver starts polling the hub 
ports. I intercept
the completion of these urb's and I rewrite the statusChanged bit. Also, all urbs 
which do set
operations to ports are ignored (and completed successfully). In normal operation this 
works
perfectly. Most error condition will never be seen in the uml kernel because they are 
handled by the
host kernel.
The only problem I am aware of atm is a race condition that comes from having two hub 
drivers. If,
for some reason, the client polls a hub port before the host kernel can poll it and 
that port just
had a device inserted, the host kernel won't detect that change (and make the device 
unusable in
both host and client kernel).
I might have a workaround. If I detect this in the uml hcd (when the read 
statusChanged bit was 1)
can I just cycle power on the hub port? Is there a better/cleaner way?
Can this happen with error conditions too?
Does anyone see any other possible problems or necessary additions?

I would like to move to a full hub simulation (probably based on a root hub 
simulation) if the
effort is not too big. It is a lot cleaner (especially in the uml hcd code) and avoids 
all
unintended interactions between the two hub drivers. Is the root hub simulation in the 
normal hcd's
sufficient? It would not be too difficult to port that.

thank you for any answers or suggestions,

        J.

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to