> I mean, how should the implementation work?  There's actually two 
> problems.  (1) How should we preserve the existence of devices across a 
> per-device power-off suspend (i.e., not system-wide)?  (2) How should we 
> reinitialize devices during the resume-from-idle that occurs after a 
> memory image is restored?
> 
>       For (1), I think the hub driver will have to remember devices 
> attached to powered-off ports instead of just calling usb_disconnect() 
> right away.  When the port power is turned back on, we could allow say 5 
> seconds for the device to reconnect.  When it reconnects we should check 
> whether the descriptors have changed, just like we do for a device reset.  
> If it doesn't reconnect after 5 seconds, then we call usb_disconnect().
> 
>       For (2), we should probably do a reset of the root hubs and let
> the mechanism in (1) take care of the remaining details.  For this purpose 
> a device attached to a hub that is reset can be treated the same as a 
> powered-off device.

Comments:

1. This approach will fail with many devices that need firmware.
2. Potentially, we have no working user space. We'd better not
generate hotplug calls here, but queue them.
3. Calling disconnect() seems error prone. Deadlock country.
I'd rather simply fail resume() and leave the mess to the core.

        Regards
                Oliver


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to