Basic suspend/Resume issue

Bug #974123 reported by Sunil Kamath
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IglooCommunity
Fix Released
High
Ramesh Chandrasekaran

Bug Description

Currently suspend/resume is been disabled.
we understand that it has dependency on other drivers.
Enable suspend/resume and ensure that its functioning properly after issues in drivers like mali/wifi are solved.

Please raise issue, if you find any other driver is not letting suspend/resume to function properly.

Changed in igloocommunity:
importance: Undecided → High
assignee: nobody → NaveenKumar Gaddipati (naveen-gaddipati)
milestone: none → 2012.04
Revision history for this message
Sunil Kamath (sunil-kamath) wrote :

Naveen,
Can you please create launchpad bugs with proper description for mali/wifi.

We will target all suspend/resume issues for 12.05.

Changed in igloocommunity:
milestone: 2012.04 → 2012.05
Changed in igloocommunity:
assignee: NaveenKumar Gaddipati (naveen-gaddipati) → Ramesh Chandrasekaran (ramesh-chandrasekaran)
Revision history for this message
Ramesh Chandrasekaran (ramesh-chandrasekaran) wrote :

Anlaysis, Findings & Fix progress:-

1) When any driver fails to suspend, the system should resume itself from suspend procedure. But in our case it hangs, becoz There is a bad crash when the system suspends (enable no_console_suspend - to see this). The crash indicated invalid PC. That is jumping to some invalid function (that's all we have from the crash).After spending long time in tracing, the Reason, is we are calling generic platform suspend ops, even for amba bus devices (in our case uart2, which is added as amba bus device). platform suspend ops function thinks the device passed to it as platform device and tries and tries to get the suspend ops using platform convertion macros, unfortunately the pointer is invalid and jumps to some invalid address(data segment), which caused a bad crash. [ Status -> Fixed. Solution: Fixed the amba devices runtime_suspend power ops properly to amba runtime suspend ops function pointers instead of platform suspend ops]

2) After the above step, dma controller failed to suspend (dma0.40). Because, the suspend function of dma driver, checks, whether the runtime suspend of dma controller is exectued properly & successfully. Unfortunately, this flag was set false, even when the dma controllers runtime_suspend routine executed successfully. Kind of some bug some where??. Compared the internal u8500 base line, oops, this check is removed from the dma driver suspend routine. Did the same in our branch too (may be a workaround) [Status -> fixed. Solution: Remove the dma drivers runtime_suspend check]

3) After the above step, Both the processor cores and all the drivers suspended sucessfully !!! But it does not end there- there are some pending interrupts which seems to be set and hence the suspend process is aborted and all the devices are resumed successfully again. Hunting behind, which interrupt is set. Couldn't find the all GIC registers details in datasheet...[Status -> In progress. Solution: Give me one, if you already faced this somewhere else...]

Changed in igloocommunity:
status: New → In Progress
Revision history for this message
Ramesh Chandrasekaran (ramesh-chandrasekaran) wrote :

The Basic Suspend/Resume is working but with following limitations:

[The patch for Basic Suspend/Resume working is under review, and will be merged soon]

Limitations/Not working drivers, after inclusion of this basic suspend/Resume patch
------------------------------------------------------------------------------------------------
1) After resuming, ethernet driver doesn't work.[https://bugs.launchpad.net/igloocommunity/+bug/995765]
2) With Wlan & Bluetooth ON, resume doesn't work. [https://bugs.launchpad.net/igloocommunity/+bug/995768]
3) Sometimes, the usb mouse connected, after resume, gives error and doesn't re-enumerate the device.
    Also, after suspend, whatever device inserted/removed in to the usb is not detected.
    Even, in normal scenario, irrespective of suspend/resume, unplugging and plugging of usb device doesn't work.
    [https://bugs.launchpad.net/igloocommunity/+bug/995771]
4) Sometimes, immediately after suspend, the system resumes (May be because of some gpio interrupts & prcmu error)
But this doesn't happen always, and the subsequent suspends happens smoothly.
[https://bugs.launchpad.net/igloocommunity/+bug/995772]

Revision history for this message
Ramesh Chandrasekaran (ramesh-chandrasekaran) wrote :

Untill all these limitations are resolved, the suspend/resume will not be enabled by default in kernel config.

Fix for basic suspend/resume to work is tested & patch is sent for review & merge.

Changed in igloocommunity:
status: In Progress → Fix Committed
Revision history for this message
Ramesh Chandrasekaran (ramesh-chandrasekaran) wrote :

The following command needs to be executed, for the basic suspend/Resume to work

echo N > /sys/module/printk/parameters/console_suspend

This disables the console from going to suspend. If console is disabled during suspend, the prcmu is not going to power down. Separate bug is raised for this,

https://bugs.launchpad.net/igloocommunity/+bug/995772

summary: - Resolve resume/suspend issue
+ Basic suspend/Resume issue
Changed in igloocommunity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.