On Fri, Dec 13, 2002, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> Am Freitag, 13. Dezember 2002 13:23 schrieb Oliver Kurth:
>
> > int usb_reset_device(struct usb_device *dev)
> > {
> >
> > ...
> >
> > if (port < 0)
> > return -ENOENT;
> >
> > info("before down(&usb_address0_sem)");
> > down(&usb_address0_sem);
> > info("after down(&usb_address0_sem)");
> >
> > The info() messages are set by me.
> > I never get the message "after down(&usb_address0_sem)".
> >
> > I already tried to do up(&usb_address0_sem); before reset, but
> > then I get "unresolved symbols".
> >
> > Suggestions welcome...
>
> OK. It seems that the lockup goes as follows:
>
> usb_hub_events() ->usb_hub_port_connect_change()->[down(&usb_address0_sem)]
> ->usb_new_device()->usb_find_drivers()->usb_find_interface_driver()->probe()
> ->usb_reset_device->[down(&usb_address0_sem)] --- BANG, you're dead.
Ahh, that makes sense.
> usb_hub_port_connect_change() should drop the semaphore
> before usb_new_device(). How to do that? Is doing usb_new_device
> several times really necessary?
The semaphore protects the bus for the 0 address. We could either move
obtaining the sempahore into usb_new_device(), or move the
usb_set_address() call into usb_hub_port_connect_change().
I think we should move the semaphore into usb_new_device() and
usb_reset_device() into usb.c.
JE
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel