[BetterBatteryStats] Karpfenhai:
Ha Guys, maybe the solution is inside here?

What is the difference between:

[374978.679779] Restarting tasks ...
[374978.694051] dai_active 0, IISMOD d0001c00, IISCON 8010ce38
[374978.695392] done.
[374978.695575] suspend: exit suspend, ret = -16 (2012-01-22 22:59:26.197533683 UTC)
[374978.870269] PM: Syncing filesystems ... done.
[374978.871270] Freezing user space processes ... (elapsed 0.01 seconds) done.
[374978.889523] Freezing remaining freezable tasks ... (elapsed 0.28 seconds) done.
[374979.299419] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374979.299521] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374979.299668] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374979.299756] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374979.299907] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374979.300830] PM: suspend of devices complete after 129.739 msecs
[374979.301267] PM: late suspend of devices complete after 0.283 msecs
[374979.301267] S5P_WAKEUP_STAT 0x2
[374979.301267] EINT_PEND 0x2, 0x0, 0x0, 0x48
[374979.301659] PM: early resume of devices complete after 0.281 msecs
[374979.372524] fsa9480 7-0025: dev1: 0x0, dev2: 0x0
[374979.372898] wakeup wake lock: event2-148
[374979.373000] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374979.373193] [ wm8994_samsung.c (wm8994_resume,3103) ] ------WM8994 Revision = [3]-------
[374979.373482] PM: resume of devices complete after 71.613 msecs
[374979.373763] Restarting tasks ... done.
[374979.382601] suspend: exit suspend, ret = 0 (2012-01-22 22:59:33.009590586 UTC)
[374979.382752] active wake lock mmc1_detect
[374979.385310] dai_active 0, IISMOD d0001c00, IISCON 8010ce38
[374979.555380] PM: Syncing filesystems ... done.
[374979.590016] Freezing user space processes ... (elapsed 0.01 seconds) done.
[374979.608187] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[374979.752361] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374979.752527] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374979.752631] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374979.752794] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374979.752904] pm_op(): platform_pm_suspend+0x0/0x5c returns -16
[374979.753051] PM: Device alarm failed to suspend: error -16
[374979.753131] PM: Some devices failed to suspend
[374979.753306] [ wm8994_samsung.c (wm8994_resume,3103) ] ------WM8994 Revision = [3]-------
[374979.753620] PM: resume of devices complete after 0.342 msecs

Which happens around a thousand times within this log and here:

[374980.921755] Restarting tasks ... done.
[374980.933358] suspend: exit suspend, ret = -16 (2012-01-22 22:59:34.560351141 UTC)
[374980.933509] active wake lock mmc1_detect
[374980.933588] active wake lock alarm_rtc, time left 509
[374980.950567] dai_active 0, IISMOD d0001c00, IISCON 8010ce38
[374981.155809] select 27372 (ndroid.exchange), adj 9, size 6168, to kill
[374981.155945] select 27763 (e.android.email), adj 9, size 7034, to kill
[374981.156013] send sigkill to 27763 (e.android.email), adj 9, size 7034
[374981.884529] select 27372 (ndroid.exchange), adj 9, size 6168, to kill
[374981.884667] send sigkill to 27372 (ndroid.exchange), adj 9, size 6168
[374983.047672] PM: Syncing filesystems ... done.
[374983.088953] Freezing user space processes ... (elapsed 0.01 seconds) done.
[374983.108132] Freezing remaining freezable tasks ... (elapsed 0.23 seconds) done.
[374983.471107] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374983.471212] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374983.471360] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374983.471448] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374983.471599] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374983.472517] PM: suspend of devices complete after 129.613 msecs
[374983.472953] PM: late suspend of devices complete after 0.283 msecs
[374983.472953] S5P_WAKEUP_STAT 0x2
[374983.472953] EINT_PEND 0x2, 0x0, 0x0, 0x48
[374983.473344] PM: early resume of devices complete after 0.280 msecs
[374983.544261] fsa9480 7-0025: dev1: 0x0, dev2: 0x0
[374983.544572] wakeup wake lock: event2-148
[374983.544673] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374983.544868] [ wm8994_samsung.c (wm8994_resume,3103) ] ------WM8994 Revision = [3]-------
[374983.545229] PM: resume of devices complete after 71.615 msecs
[374983.545485] Restarting tasks ...
[374983.566067] dai_active 0, IISMOD d0001c00, IISCON 8010ce38
[374983.573577] done.
[374983.573776] suspend: exit suspend, ret = 0 (2012-01-22 22:59:41.029098126 UTC)
[374983.573927] active wake lock mmc1_detect
[374983.574006] active wake lock wlan_wake
[374983.574085] active wake lock alarm, time left 1272
[374983.574227] active wake lock vbus_present, time left 121
[374983.784816] select 27812 (viders.calendar), adj 9, size 6398, to kill
[374983.784954] send sigkill to 27812 (viders.calendar), adj 9, size 6398
[374984.198474] select 27846 (e.android.email), adj 9, size 6578, to kill
[374984.198609] send sigkill to 27846 (e.android.email), adj 9, size 6578
[374984.710821] PM: Syncing filesystems ... done.
[374984.711930] Freezing user space processes ... (elapsed 0.01 seconds) done.
[374984.729172] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[374984.873376] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374984.873543] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374984.873629] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374984.873778] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374984.873868] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374984.874845] PM: suspend of devices complete after 129.758 msecs
[374984.875216] PM: late suspend of devices complete after 0.284 msecs
[374984.875216] S5P_WAKEUP_STAT 0x1
[374984.875216] EINT_PEND 0x2, 0x0, 0x10, 0x48
[374984.875613] PM: early resume of devices complete after 0.280 msecs
[374984.945952] wakeup wake lock: wlan_wake
[374984.946519] fsa9480 7-0025: dev1: 0x0, dev2: 0x0
[374984.946907] s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
[374984.947040] [ wm8994_samsung.c (wm8994_resume,3103) ] ------WM8994 Revision = [3]-------
[374984.947388] PM: resume of devices complete after 71.502 msecs
[374984.947671] Restarting tasks ...

The minus 16 error is gone afterwards and the wakelock too.

What have i found:

We've bisected this effect down to commit 152e1d5920 ("PM: Prevent
waiting forever on asynchronous resume after failing suspend").
Suspending our PXA3xx based system breaks with this patch.

I tried to understand what's going wrong, but I didn't follow the
discussion about this logic, so I would rather like to pass it back to
the originating people.

I can only guess that the problem here is the somewhat tricky handling
around mmc_sdio_suspend(), which returns -ENODEV (-16) in case a
particular function of a card can not be suspended. The SDIO core would
have simply removed the card in this case normally, but the PM core
seems to interfere now, stopping the whole suspend procedure.

Sooo... ?? Its the SDCard, isnt it??

Take it out, check Kmsg for this mmc1 and mmc0 thing, if its gone, burn this Ü*PO)=?(Ü* SD-Card down!

Im done with this now, need some sleep ...

Some more info from Kernel org:

Patch 4c2ef25fe0b847d2ae818f74758ddb0be1c27d8e "mmc: fix all hangs

related to mmc/sd card insert/removal during suspend/resume" (which

was introduced in 2.6.36 and backported to stable kernels) moved the

card remove/insert mechanism out of the suspend/resume path and into

mmc_pm_notify (which uses pm notifiers; needed in order to let user

space sync the card upon removal).

It broke (part of) SDIO suspend because SDIO relied on

mmc_suspend_host() to remove the card, and squash the error, in case

-ENOSYS is returned from the bus suspend handler (mmc_sdio_suspend()

in this case).

mmc_sdio_suspend() is using this whenever one of the card's SDIO

function drivers does not have suspend/resume handlers - in that case

it is agreed to force removal of the entire card.

So the trivial thing to do here was to bring back that part of

mmc_suspend_host(), which was removed by

4c2ef25fe0b847d2ae818f74758ddb0be1c27d8e.

So a Kernel Bug?

Thx for you patience @ Picollo