On Mon, 30 Jan 2012, Bjørn Mork wrote: > Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> writes: > > > I disagree. Counters are needed only when a resource is being shared, > > and interfaces aren't supposed to be shared between drivers. > > > > If you decide that you have to go against this model, then it is up to > > you to figure out how to manage one interface using your two drivers. > > But you shouldn't drag the rest of the USB stack into it. > > I must agree with this. The use case is very driver specific. > > But still, a common interface for setting needs_remote_wakeup would be > useful. I believe most drivers using this right now will fail to do the > 1 => 0 transition in a way which allows devices without remote wakeup > support to autosuspend. Fixing all drivers can of course be done, but > will probably have to be redone everytime a new driver is added. It's > just not obvious that you need to wrap the change in > usb_autopm_get/put_interface calls We could create a new core routine for setting needs_remote_wakeup. If the device is currently active and the value is changing from 1 to 0, the routine could do the autopm_get/put. 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