[PORT FROM R2] mid_pmu: retry d0ix if completion fails
authorIllyas Mansoor <illyas.mansoor@intel.com>
Fri, 4 May 2012 15:18:45 +0000 (20:48 +0530)
committerbuildbot <buildbot@intel.com>
Tue, 15 May 2012 18:53:32 +0000 (11:53 -0700)
commit82d1369b9a70230fdbfa3e94194de58d7c53532c
treedf803878da41ac1cd2535078857751c0d126d561
parent3c7a5394a8245a7b33312e56359d4fc4f29302c0
[PORT FROM R2] mid_pmu: retry d0ix if completion fails

BZ: 32634

We get kernel panic in pmu_pci_set_power_state() while
waiting for d0ix command completion interrupt, we timeout for
the d0ix completion interrupt and see that transition is still
not complete.

<2>[ 8519.381692] pmu_pci_set_power_state: completion timeout: 8086 0829 0000:00:02.3          penwell_otg:
<2>[ 8519.381934] interrupt pending = 0
<2>[ 8519.382019] pmu_busy_status = 0
<2>[ 8519.382097] suspend_started = 0
<2>[ 8519.382175] shutdown_started = 0
<2>[ 8519.382254] interactive_cmd_sent = 0
<2>[ 8519.382343] camera_off = 1 display_off = 1
<2>[ 8519.382442] s0ix_possible = 0xf
<2>[ 8519.382520] s0ix_entered = 0x0
<2>[ 8519.382596] pmu_current_state = 0

We will avoid setting the d0ix completion interrupt.

This should remove one of the variable that may affect
this issue.

Also we retry sending d0ix command, until it fails thrice or succeeds.

Change-Id: I00355647a4cba2f737f1d4ba6737eb40bdf465e0
Orig-Change-Id: I3804ee03ef8964cc37c151ce973a81f5ef82c286
Signed-off-by: Illyas Mansoor <illyas.mansoor@intel.com>
Reviewed-on: http://android.intel.com:8080/44452
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Tested-by: Martin, LoicX <loicx.martin@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
arch/x86/platform/intel-mid/intel_soc_pmu.c