On Sun, 14 Jan 2007, Tilman Schmidt wrote: > Hello Pavel, > > resending because I got no answer ... > > Am 05.10.2006 00:05 schrieb Pavel Machek: > >> if (ret != -EAGAIN) > >> msleep(1000); > >> + if (try_to_freeze()) > >> + uea_err(INS_TO_USBDEV(sc), "suspend/resume not > >> supported, " > >> + "please unplug/replug your modem\n"); > > > > Plug/unplug should be easy enough to simulate from usb driver, no? > > If that is true then I would be very interested in knowing how. > I, too, am confronted with USB device error conditions which I > don't know how to clear except by telling the user to unplug the > device.
It depends on exactly what you want. Lots of things happen when a USB device is plugged in, and some of them can be simulated more easily than others. For instance, if the device is bus-powered then it goes from a power-off to a power-on state. This cannot be simulated. The device receives a USB port reset. This can be simulated by calling usb_reset_device() or usb_reset_composite_device(). The device is configured. This can be simulated by calling usb_reset_configuration(). And so on... Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
