Bug 189681

Summary: (Possibly) i2c_designware causing kernel panic after first hibernation
Product: Drivers Reporter: Pellegrino Prevete (pellegrinoprevete)
Component: I2CAssignee: Drivers/I2C virtual user (drivers-i2c)
Status: NEW ---    
Severity: normal CC: pellegrinoprevete
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 4.4.0 Subsystem:
Regression: No Bisected commit-id:
Attachments: Kernel log of the situation.
syslog of the situation
Kernel log of hibernation without i2c_designware_platformmodule

Description Pellegrino Prevete 2016-12-04 18:47:00 UTC
Created attachment 246821 [details]
Kernel log of the situation.

Hi everyone.
Hibernation in ASUS X205TA works just the first time. After the first resume, trying to suspend again will result the pc completely blocking (even no logs) while creating the image.
Without modifications, the system would get stuck just after

echo disk > /sys/power/state

Unloading wireless brcmfmac module and inserting i2c_designware_platform module in initramfs one can get at most one hibernation.

I'm attaching kern.log and syslog containing the logs of the following sequence
- first normal boot
- hibernation
- resume
- hibernation with panic (nothing appears here)
- forced reboot

As you can see, there isn't anything about the fact that the pc crashed neither that I tried another "disk > state" command.
Apparently, the difference with a normal boot are

i2c_designware 80860F41:00: controller timed out

followed by

[drm:vlv_set     _power_well [i915]] *ERROR* timeout setting power well st     ate 0000c000 (00ffcc00)
[drm:vlv_set     _power_well [i915]] *ERROR* timeout setting power well st     ate 00003000 (00fffc00)
[drm:vlv_set     _power_well [i915]] *ERROR* timeout setting power well st     ate 000000c0 (00fffcc0)
[drm:valleyv     iew_modeset_commit_cdclk [i915]] *ERROR* timed out waitin     g for CDclk change

I've tried unloading i2c_designware_platform module, succeding in getting how many hibernations I want. Anyway after some resume, the pc start altering its own time, sometime converging to a precise time, sometimes going faster then slower. When this happens, one can see while creating of the image the following line

PM: Basic memory bitmaps created
PM: Preallocating image memory...
clocksource: timekeeping watchdog on CPU3: Marking clocksource 'tsc' as unstable because the skew is too large:
clocksource: 'refined-jiffies' wd_now: 1000101c8 wd_last: 100010150 mask: ffffffff
clocksource: 'tsc' cs_now: 278de831c0 cs_last: 275a6a58b0 mask: ffffffffffffffff
clocksource: Switched to clocksource refined-jiffies
done (allocated 148056 pages)
PM: Allocated 592224 kbytes in 0.28 seconds (2115.08 MB/s)

kern.log-without_i2c_designware_platform contains the same sequence as above.
Comment 1 Pellegrino Prevete 2016-12-04 18:47:45 UTC
Created attachment 246831 [details]
syslog of the situation
Comment 2 Pellegrino Prevete 2016-12-04 18:48:28 UTC
Created attachment 246841 [details]
Kernel log of hibernation without i2c_designware_platformmodule
Comment 3 Pellegrino Prevete 2016-12-04 19:34:48 UTC
Sorry, the first kern/syslog were without i2c_module_platform in initramfs.