Oliver Neukum <oliver@xxxxxxxxxx> writes: > Bjørn, in this case it is best to provide two helping function > pointers when you create the "subdevice" and realize the counters > in the network driver. Do you mean to let the cdc-wdm subdriver call back the main driver when it wants to set/clear the needs_remote_wakeup flag? Yes, I can do that but I sort of feel it messes up the interface for little gain. We'd need to store the callback pointers and modify wdm_open and wdm_release to use them conditionally. Or provide local callbacks for use as a normal driver. Not pretty at all. I am currently leaning towards just documenting that cdc-wdm will change the needs_remote_wakeup flag and that any driver using cdc-wdm as a subdriver therefore will have to prevent autosuspending while being active. This can be done without involving neither usb core nor cdc-wdm. The main driver can keep its' private version of the needs_remote_wakeup flag and consult that and device_can_wakeup() on autosuspend. Bjørn -- 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