Re: How to force enumeration from linux gadget/device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 11 May 2011, Marc St-Jean wrote:

> > There are a couple of things you could do.  The easiest is to unload
> > the gadget driver and then reload it a second or so later.  For
> > example, if you're using g_ether:
> >
> > 	rmmod g-ether
> > 	sleep 1
> > 	modprobe g-ether
> 
> I'm assuming you mean g_ether.ko? I've tried this already and it didn't 
> appear to help.

If the driver module is installed properly in the correct location, you
can write "g-ether" instead of "g_ether.ko".  And it _should_ cause the
host to see a disconnect.  If not, you can try unloading and reloading
the UDC driver along with the gadget driver.

BTW, you should try testing this on a linux-based host, with
CONFIG_USB_DEBUG enabled, and see what shows up in the host's dmesg log
when you do it.  If the linux host sees a disconnect, so will a WinCE
host.

> > Alternatively, if you can change the source code for the gadget driver
> > and if your controller driver supports this, you can have the gadget
> > driver call:
> >
> > 	usb_gadget_disconnect(gadget);
> > 	ssleep(1);
> > 	usb_gadget_connect(gadget);
> 
> I'm assuming this is equivalent to the rmmod above?

More or less.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux