On Wednesday 23 August 2006 15:10, Alan Stern wrote:
>
> It isn't trivial, but it's also not impossible.  There are a couple of
> places where the kernel does it.  For example, look at
> usb_hcd_resume_root_hub() in hcd.c, which calls usb_resume_root_hub() in
> hub.c.  Or look at usb_hc_died() in hcd.c, which calls usb_kick_khubd() in
> hub.c.
>
> The general strategy has been to break the job up into two pieces:  The
> HCD framework goes from the hcd struct to the usb_device struct for the
> root hub, and the hub driver then goes from that to the usb_hub struct.
>
> Of course, you do have to watch out for the possibility that there _is_ no
> hub structure associated with the root hub.  This can happen if someone
> unbinds the hub driver or if you try to manipulate the data structure
> before it is fully registered.

Ok, I am officially dumb: hdev_to_hub(). Dah!

I'll change the code tomorrow to set a flag variable in struct usb_hub
and leave port-status unmodified.

Thanks for the nudge, Alan

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to