On Tue, 17 Jul 2012, Lan Tianyu wrote: > > But the driver will not work if you don't use remote wakeup when it needs it. > > Under those circumstances you better unbind the driver. > > > hi Oliver: > Thanks for reply. Why unbind driver? I am sorry I don't understand it. > Can you elaborate it for me? :) > When device is suspended, that means driver will not work, right? I'm not sure what you're asking here. Drivers work okay with suspended devices -- except in one case: They don't work if the driver asks for remote wakeup and the device is not enabled for remote wakeup when it suspends. > Disable remote wakeup is to keep device being suspended in some > circumstances(system idle) which may be not willing to see device resuming. Do you mean you want to prevent the device from being suspended? Or do you mean that once it is suspended, you want to keep it suspended (i.e., prevent it from being resumed)? The right way to prevent a device from being suspended is to write "on" to the power/control attribute. There is no single right way to prevent a device from being resumed. If the device's driver needs to access the device, it _will_ be resumed. So the only way to do this is by making sure the driver doesn't need to access the device. The safest way to accomplish that is to unbind the driver. > >> So that means the device's remote wakeup can not be disabled and usb > >> port can not be powered off. So I try to provide a control of remote > >> wakeup to userspace. When system becomes idle such as blank screen, > >> some usb devices may be able to disable remote wakeup and power off. > > > > Yes, this is an unsoved problem. But the approach is no good. Don't > > disable remote wakeup behind the driver's back. Tell the driver that a reduced > > level of service is acceptable. > > > How to tell the driver? It depends on the driver. But are you sure that's what you want to do? 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