[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>