On Mon, Dec 17, 2001 at 11:19:31AM +0100, Martin Diehl wrote: > > > Well, as explained in the other posting, suspend/resume is pretty much > > > different from unplug/replug because a suspended device is still drawing > > > some power from the suspended USB. This way even a buspowered device can > > > keep its state and the host can be sure, it's still the same device which > > > he will resume later on. > > > > How? The host will not be notified when the device is unplugged and > > replugged while suspended. > > The HC has to monitor the USB state anyway - at least if it supports > remote wakeup. A device which signals remote wakeup executes exactly a > simulated disconnect/reconnect cycle on the USB which triggers the host > to resume, if enabled. If the host is unable to monitor the bus state > (I don't know whether this applies to _any_ HC D* state), you are right, > it can't tell. But in this case the HC is required to signal a connect > when resuming operation anyway - it's all in chapter 9 of the USB specs.
Again, same problem as mentioned earlier. Think hubs. > > The host should pass all the relevant information to an userspace agent, > > which can then decide (even can let the user decide if really needed) > > whether it is the same device and should be used as such or not. > > Do you really believe in average users' ability to decide whether a device > which was connected to a different box meanwhile is still the > "same" device? No. I believe in most cases this can be handled by software and always on the safe side. And if this is not convenient, it could be configured to ask. > > You usually will want a replacement device just work without having to > > restart all the programs using it. > > So you wan't the application which has open files on a usb-disk to > continue writing to these files if there is a replacement device there > after suspend/resume (with unplug/replug)? > I doubt that's what you wanted to say? Yes, I didn't want to say that. Anyway, this would be the same as with NFS soft/hard mounts. It *makes* sense. I must admit I was thinking about mice mostly. > IMHO the HC+HCD can tell whether this can be treated as a resume or not. > If not, the application shall be forced to close all open files... Remember the 'already running port %i disabled by hub (EMI?), re-enabling...' message? Well, that happens quite often on some machines and/or hubs. Do you want all applications that have open files on that device to close them in case of EMI, which can be as frequent as every couple minutes? -- Vojtech Pavlik SuSE Labs _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
