The last reply from Ivan, given below, shows that his chip is reset during suspend to mem. The resume fails as the isp116x-hcd's resume() method has currently no support to handle the reset chip.
I went thru the docs in kernel's Documentation/power/ and understood that for supporting suspend to mem, the driver's resume method must be prepared to initialize the hardware from scratch. Have I understood it right? If yes then the solution would be to add the necessary state saving and restoring support to isp116x-hcd. A quicker, temporary solution may be to unload isp116x-hcd before suspend and reload it after resume. The latter may not work for mounted memory sticks, however. I go look how other usb HCD's handle this. Advise would be welcome. Thanks in advance. Olav Ivan, please keep the USB list CC-ed. On Fri, 7 Oct 2005, Ivan Kalatchev wrote: > Hi Olav, > > > You can try, whether suspend/resume cycle occurs normally, > > if you do it with commands to suspend and resume, > > respectively. > > > > echo -n 3 > /sys/bus/platform/devices/isp116x-hcd.0/power/state > > echo -n 0 > /sys/bus/platform/devices/isp116x-hcd.0/power/state > > > > I used following commands to suspend/resume usb only, as that's what I have > in /sys > > echo -n 3 > /sys/devices/platform/isp116x_hcd/power/state > echo -n 0 > /sys/devices/platform/isp116x_hcd/power/state > > Everything worked fine and here is part of dmesg of successful > suspend/resume > > /////////////////////// > 116x: isp116x_suspend: state 3, phase 2 > usb-storage 1-2:1.0: resume is unsafe! > 116x: SetPortFeature: <7>116x: USB_PORT_FEAT_SUSPEND > 116x: isp116x-hcd suspended > 116x: isp116x_suspend: state 3, phase 1 > 116x: isp116x_suspend: state 3, phase 3 > 116x: isp116x-hcd suspended > 116x: isp116x_resume: state 3, phase 0 > 116x: HCREVISION [00]: 00000010 > 116x: HCCONTROL [01]: 000000c0 > 116x: HCCMDSTAT [02]: 00000000 > 116x: HCINTSTAT [03]: 00000004 > 116x: HCINTENB [04]: 80000050 > 116x: HCFMINTVL [0d]: 27782edf > 116x: HCFMREM [0e]: 0000215a > 116x: HCFMNUM [0f]: 00002bea > 116x: HCLSTHRESH [11]: 00000628 > 116x: HCRHDESCA [12]: 19000902 > 116x: HCRHDESCB [13]: 00060000 > 116x: HCRHSTATUS [14]: 00000000 > 116x: HCRHPORT1 [15]: 00000100 > 116x: HCRHPORT2 [16]: 00000107 > 116x: HCHWCFG [20]: 140d > 116x: HCDMACFG [21]: 0000 > 116x: HCXFERCTR [22]: 0018 > 116x: HCuPINT [24]: 0061 > 116x: HCuPINTENB [25]: 0012 > 116x: HCCHIPID [27]: 6122 > 116x: HCSCRATCH [28]: 0000 > 116x: HCITLBUFLEN [2a]: 0000 > 116x: HCATLBUFLEN [2b]: 1000 > 116x: HCBUFSTAT [2c]: 0000 > 116x: HCRDITL0LEN [2d]: 0000 > 116x: HCRDITL1LEN [2e]: 0000 > 116x: isp116x_hub_resume: Resuming port 1 > 116x: GetPortStatus > 116x: GetPortStatus: port[1] 00000100 > 116x: GetPortStatus > 116x: GetPortStatus: port[2] 00000107 > 116x: ClearPortFeature: <7>116x: USB_PORT_FEAT_SUSPEND > 116x: GetPortStatus > 116x: GetPortStatus: port[2] 00040103 > 116x: isp116x-hcd resumed > 116x: isp116x_resume: state 0, phase 1 > 116x: isp116x_resume: state 0, phase 2 > 116x: GetPortStatus > 116x: GetPortStatus: port[1] 00000100 > 116x: GetPortStatus > 116x: GetPortStatus: port[2] 00040103 > 116x: ClearPortFeature: <7>116x: USB_PORT_FEAT_C_SUSPEND > //////////////////////// > > Is there any way to resume USB after it has been reset? - I mean if I'll > suspend the whole board? > > Ivan ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel