linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] cros_ec_debugfs causes a WARNING trace during suspend on ASUS C201
@ 2019-03-19 10:36 Urja Rannikko
  2019-03-19 13:37 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Urja Rannikko @ 2019-03-19 10:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: bleung, enric.balletbo, groeck

[-- Attachment #1: Type: text/plain, Size: 368 bytes --]

Hi,

I was testing 5.1-rc1 on my C201 when i found this, dmesg of a
suspend/resume attached.

Based on a quick look at the code it looks like the reason is that the
suspend and resume calls try to cancel/schedule log_poll_work
unconditionally but this device doesnt support reading the console log
so the delayed work struct was never initialized.


-- 
Urja Rannikko

[-- Attachment #2: suspend_cros_ec_debugfs.txt --]
[-- Type: text/plain, Size: 13178 bytes --]

[   76.192760] PM: suspend entry (deep)
[   76.196324] PM: Syncing filesystems ... done.
[   77.003257] Freezing user space processes ... (elapsed 0.002 seconds) done.
[   77.016312] OOM killer disabled.
[   77.033825] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[   77.054055] printk: Suspending console(s) (use no_console_suspend to debug)
[   77.074233] ------------[ cut here ]------------
[   77.074283] WARNING: CPU: 2 PID: 361 at kernel/workqueue.c:3030 __flush_work+0x38/0x154
[   77.074293] Modules linked in: snd_soc_hdmi_codec cros_ec_debugfs cros_ec_sysfs uvcvideo dw_hdmi_cec dw_hdmi_i2s_audio videobuf2_vmalloc cfg80211 gpio_charger rk_crypto rfkill videobuf2_memops videobuf2_v4l2 des_generic videobuf2_common ofpart m25p80 spi_nor tpm_i2c_infineon sbs_battery mtd tpm joydev cros_ec_dev coreboot_table evdev mousedev ip_tables x_tables [last unloaded: brcmutil]
[   77.074469] CPU: 2 PID: 361 Comm: systemd-sleep Not tainted 5.1.0-rc1-1-ARCH+ #1
[   77.074480] Hardware name: Rockchip (Device Tree)
[   77.074534] [<c020e4b0>] (unwind_backtrace) from [<c020ac18>] (show_stack+0x10/0x14)
[   77.074575] [<c020ac18>] (show_stack) from [<c07a3e04>] (dump_stack+0x7c/0x9c)
[   77.074619] [<c07a3e04>] (dump_stack) from [<c0222748>] (__warn+0xd0/0xec)
[   77.074657] [<c0222748>] (__warn) from [<c022279c>] (warn_slowpath_null+0x38/0x44)
[   77.074694] [<c022279c>] (warn_slowpath_null) from [<c02365d0>] (__flush_work+0x38/0x154)
[   77.074735] [<c02365d0>] (__flush_work) from [<c023786c>] (__cancel_work_timer+0x114/0x1a4)
[   77.074784] [<c023786c>] (__cancel_work_timer) from [<bf33233c>] (cros_ec_debugfs_suspend+0x14/0x1c [cros_ec_debugfs])
[   77.074859] [<bf33233c>] (cros_ec_debugfs_suspend [cros_ec_debugfs]) from [<c056a888>] (dpm_run_callback+0x64/0xcc)
[   77.074901] [<c056a888>] (dpm_run_callback) from [<c056ad2c>] (__device_suspend+0x174/0x3a8)
[   77.074940] [<c056ad2c>] (__device_suspend) from [<c056b9e0>] (dpm_suspend+0x174/0x1e0)
[   77.074977] [<c056b9e0>] (dpm_suspend) from [<c026b3e0>] (suspend_devices_and_enter+0x6c/0x50c)
[   77.075010] [<c026b3e0>] (suspend_devices_and_enter) from [<c026ba8c>] (pm_suspend+0x20c/0x274)
[   77.075038] [<c026ba8c>] (pm_suspend) from [<c026a628>] (state_store+0x54/0x88)
[   77.075070] [<c026a628>] (state_store) from [<c03cd2d0>] (kernfs_fop_write+0x114/0x180)
[   77.075108] [<c03cd2d0>] (kernfs_fop_write) from [<c035d48c>] (__vfs_write+0x1c/0x154)
[   77.075148] [<c035d48c>] (__vfs_write) from [<c035f9e8>] (vfs_write+0xb8/0x198)
[   77.075180] [<c035f9e8>] (vfs_write) from [<c035fbc0>] (ksys_write+0x3c/0x74)
[   77.075208] [<c035fbc0>] (ksys_write) from [<c0201000>] (ret_fast_syscall+0x0/0x4c)
[   77.075223] Exception stack(0xe9365fa8 to 0xe9365ff0)
[   77.075249] 5fa0:                   00000004 beef8b28 00000004 beef8b28 00000004 00000000
[   77.075278] 5fc0: 00000004 beef8b28 02319170 00000004 beef8b28 00000004 b6f3d900 beef8b74
[   77.075298] 5fe0: 0000006c beef8a98 b6c0adac b6c66534
[   77.075315] ---[ end trace f4ee5df14e8ea0ec ]---
[   77.108385] LDO_REG2: No configuration
[   77.151167] Disabling non-boot CPUs ...
[   77.184675] Enabling non-boot CPUs ...
[   77.187798] CPU1 is up
[   77.190849] CPU2 is up
[   77.194197] CPU3 is up
[   77.205772] rockchip-pm-domain ff730000.power-management:power-controller: failed to get ack on domain 'pd_video', val=0x8020c
[   77.316151] usb usb3: root hub lost power or was reset
[   77.365823] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[   77.425322] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[   77.427060] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[   77.428825] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[   77.431901] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[   77.494515] mmc_host mmc1: Bus speed (slot 0) = 148500000Hz (slot req 150000000Hz, actual 148500000HZ div = 0)
[   77.627409] usb 2-1: reset high-speed USB device number 2 using dwc2
[   77.659424] usb 3-1: reset high-speed USB device number 2 using ehci-platform
[   77.683443] ------------[ cut here ]------------
[   77.683494] WARNING: CPU: 0 PID: 361 at kernel/workqueue.c:1627 __queue_delayed_work+0x74/0x140
[   77.683505] Modules linked in: snd_soc_hdmi_codec cros_ec_debugfs cros_ec_sysfs uvcvideo dw_hdmi_cec dw_hdmi_i2s_audio videobuf2_vmalloc cfg80211 gpio_charger rk_crypto rfkill videobuf2_memops videobuf2_v4l2 des_generic videobuf2_common ofpart m25p80 spi_nor tpm_i2c_infineon sbs_battery mtd tpm joydev cros_ec_dev coreboot_table evdev mousedev ip_tables x_tables [last unloaded: brcmutil]
[   77.683683] CPU: 0 PID: 361 Comm: systemd-sleep Tainted: G        W         5.1.0-rc1-1-ARCH+ #1
[   77.683694] Hardware name: Rockchip (Device Tree)
[   77.683748] [<c020e4b0>] (unwind_backtrace) from [<c020ac18>] (show_stack+0x10/0x14)
[   77.683788] [<c020ac18>] (show_stack) from [<c07a3e04>] (dump_stack+0x7c/0x9c)
[   77.683832] [<c07a3e04>] (dump_stack) from [<c0222748>] (__warn+0xd0/0xec)
[   77.683870] [<c0222748>] (__warn) from [<c022279c>] (warn_slowpath_null+0x38/0x44)
[   77.683909] [<c022279c>] (warn_slowpath_null) from [<c0237000>] (__queue_delayed_work+0x74/0x140)
[   77.683949] [<c0237000>] (__queue_delayed_work) from [<c0237114>] (queue_delayed_work_on+0x48/0x54)
[   77.683999] [<c0237114>] (queue_delayed_work_on) from [<bf33231c>] (cros_ec_debugfs_resume+0x24/0x30 [cros_ec_debugfs])
[   77.684049] [<bf33231c>] (cros_ec_debugfs_resume [cros_ec_debugfs]) from [<c056a888>] (dpm_run_callback+0x64/0xcc)
[   77.684089] [<c056a888>] (dpm_run_callback) from [<c056aab0>] (device_resume+0xb8/0x17c)
[   77.684126] [<c056aab0>] (device_resume) from [<c056b58c>] (dpm_resume+0x110/0x1f0)
[   77.684162] [<c056b58c>] (dpm_resume) from [<c056b84c>] (dpm_resume_end+0xc/0x18)
[   77.684201] [<c056b84c>] (dpm_resume_end) from [<c026b4ac>] (suspend_devices_and_enter+0x138/0x50c)
[   77.684233] [<c026b4ac>] (suspend_devices_and_enter) from [<c026ba8c>] (pm_suspend+0x20c/0x274)
[   77.684262] [<c026ba8c>] (pm_suspend) from [<c026a628>] (state_store+0x54/0x88)
[   77.684294] [<c026a628>] (state_store) from [<c03cd2d0>] (kernfs_fop_write+0x114/0x180)
[   77.684332] [<c03cd2d0>] (kernfs_fop_write) from [<c035d48c>] (__vfs_write+0x1c/0x154)
[   77.684372] [<c035d48c>] (__vfs_write) from [<c035f9e8>] (vfs_write+0xb8/0x198)
[   77.684404] [<c035f9e8>] (vfs_write) from [<c035fbc0>] (ksys_write+0x3c/0x74)
[   77.684433] [<c035fbc0>] (ksys_write) from [<c0201000>] (ret_fast_syscall+0x0/0x4c)
[   77.684448] Exception stack(0xe9365fa8 to 0xe9365ff0)
[   77.684475] 5fa0:                   00000004 beef8b28 00000004 beef8b28 00000004 00000000
[   77.684503] 5fc0: 00000004 beef8b28 02319170 00000004 beef8b28 00000004 b6f3d900 beef8b74
[   77.684523] 5fe0: 0000006c beef8a98 b6c0adac b6c66534
[   77.684540] ---[ end trace f4ee5df14e8ea0ed ]---
[   77.684551] ------------[ cut here ]------------
[   77.684585] WARNING: CPU: 0 PID: 361 at kernel/workqueue.c:1629 __queue_delayed_work+0xd8/0x140
[   77.684593] Modules linked in: snd_soc_hdmi_codec cros_ec_debugfs cros_ec_sysfs uvcvideo dw_hdmi_cec dw_hdmi_i2s_audio videobuf2_vmalloc cfg80211 gpio_charger rk_crypto rfkill videobuf2_memops videobuf2_v4l2 des_generic videobuf2_common ofpart m25p80 spi_nor tpm_i2c_infineon sbs_battery mtd tpm joydev cros_ec_dev coreboot_table evdev mousedev ip_tables x_tables [last unloaded: brcmutil]
[   77.684753] CPU: 0 PID: 361 Comm: systemd-sleep Tainted: G        W         5.1.0-rc1-1-ARCH+ #1
[   77.684764] Hardware name: Rockchip (Device Tree)
[   77.684803] [<c020e4b0>] (unwind_backtrace) from [<c020ac18>] (show_stack+0x10/0x14)
[   77.684839] [<c020ac18>] (show_stack) from [<c07a3e04>] (dump_stack+0x7c/0x9c)
[   77.684876] [<c07a3e04>] (dump_stack) from [<c0222748>] (__warn+0xd0/0xec)
[   77.684913] [<c0222748>] (__warn) from [<c022279c>] (warn_slowpath_null+0x38/0x44)
[   77.684952] [<c022279c>] (warn_slowpath_null) from [<c0237064>] (__queue_delayed_work+0xd8/0x140)
[   77.684990] [<c0237064>] (__queue_delayed_work) from [<c0237114>] (queue_delayed_work_on+0x48/0x54)
[   77.685031] [<c0237114>] (queue_delayed_work_on) from [<bf33231c>] (cros_ec_debugfs_resume+0x24/0x30 [cros_ec_debugfs])
[   77.685075] [<bf33231c>] (cros_ec_debugfs_resume [cros_ec_debugfs]) from [<c056a888>] (dpm_run_callback+0x64/0xcc)
[   77.685113] [<c056a888>] (dpm_run_callback) from [<c056aab0>] (device_resume+0xb8/0x17c)
[   77.685149] [<c056aab0>] (device_resume) from [<c056b58c>] (dpm_resume+0x110/0x1f0)
[   77.685184] [<c056b58c>] (dpm_resume) from [<c056b84c>] (dpm_resume_end+0xc/0x18)
[   77.685219] [<c056b84c>] (dpm_resume_end) from [<c026b4ac>] (suspend_devices_and_enter+0x138/0x50c)
[   77.685250] [<c026b4ac>] (suspend_devices_and_enter) from [<c026ba8c>] (pm_suspend+0x20c/0x274)
[   77.685277] [<c026ba8c>] (pm_suspend) from [<c026a628>] (state_store+0x54/0x88)
[   77.685307] [<c026a628>] (state_store) from [<c03cd2d0>] (kernfs_fop_write+0x114/0x180)
[   77.685342] [<c03cd2d0>] (kernfs_fop_write) from [<c035d48c>] (__vfs_write+0x1c/0x154)
[   77.685379] [<c035d48c>] (__vfs_write) from [<c035f9e8>] (vfs_write+0xb8/0x198)
[   77.685410] [<c035f9e8>] (vfs_write) from [<c035fbc0>] (ksys_write+0x3c/0x74)
[   77.685438] [<c035fbc0>] (ksys_write) from [<c0201000>] (ret_fast_syscall+0x0/0x4c)
[   77.685453] Exception stack(0xe9365fa8 to 0xe9365ff0)
[   77.685477] 5fa0:                   00000004 beef8b28 00000004 beef8b28 00000004 00000000
[   77.685505] 5fc0: 00000004 beef8b28 02319170 00000004 beef8b28 00000004 b6f3d900 beef8b74
[   77.685524] 5fe0: 0000006c beef8a98 b6c0adac b6c66534
[   77.685540] ---[ end trace f4ee5df14e8ea0ee ]---
[   77.685551] ------------[ cut here ]------------
[   77.685583] WARNING: CPU: 0 PID: 361 at kernel/workqueue.c:1474 __queue_work+0x250/0x304
[   77.685591] Modules linked in: snd_soc_hdmi_codec cros_ec_debugfs cros_ec_sysfs uvcvideo dw_hdmi_cec dw_hdmi_i2s_audio videobuf2_vmalloc cfg80211 gpio_charger rk_crypto rfkill videobuf2_memops videobuf2_v4l2 des_generic videobuf2_common ofpart m25p80 spi_nor tpm_i2c_infineon sbs_battery mtd tpm joydev cros_ec_dev coreboot_table evdev mousedev ip_tables x_tables [last unloaded: brcmutil]
[   77.685747] CPU: 0 PID: 361 Comm: systemd-sleep Tainted: G        W         5.1.0-rc1-1-ARCH+ #1
[   77.685758] Hardware name: Rockchip (Device Tree)
[   77.685795] [<c020e4b0>] (unwind_backtrace) from [<c020ac18>] (show_stack+0x10/0x14)
[   77.685830] [<c020ac18>] (show_stack) from [<c07a3e04>] (dump_stack+0x7c/0x9c)
[   77.685868] [<c07a3e04>] (dump_stack) from [<c0222748>] (__warn+0xd0/0xec)
[   77.685904] [<c0222748>] (__warn) from [<c022279c>] (warn_slowpath_null+0x38/0x44)
[   77.685941] [<c022279c>] (warn_slowpath_null) from [<c0236970>] (__queue_work+0x250/0x304)
[   77.685979] [<c0236970>] (__queue_work) from [<c0237114>] (queue_delayed_work_on+0x48/0x54)
[   77.686021] [<c0237114>] (queue_delayed_work_on) from [<bf33231c>] (cros_ec_debugfs_resume+0x24/0x30 [cros_ec_debugfs])
[   77.686064] [<bf33231c>] (cros_ec_debugfs_resume [cros_ec_debugfs]) from [<c056a888>] (dpm_run_callback+0x64/0xcc)
[   77.686102] [<c056a888>] (dpm_run_callback) from [<c056aab0>] (device_resume+0xb8/0x17c)
[   77.686138] [<c056aab0>] (device_resume) from [<c056b58c>] (dpm_resume+0x110/0x1f0)
[   77.686174] [<c056b58c>] (dpm_resume) from [<c056b84c>] (dpm_resume_end+0xc/0x18)
[   77.686209] [<c056b84c>] (dpm_resume_end) from [<c026b4ac>] (suspend_devices_and_enter+0x138/0x50c)
[   77.686239] [<c026b4ac>] (suspend_devices_and_enter) from [<c026ba8c>] (pm_suspend+0x20c/0x274)
[   77.686266] [<c026ba8c>] (pm_suspend) from [<c026a628>] (state_store+0x54/0x88)
[   77.686296] [<c026a628>] (state_store) from [<c03cd2d0>] (kernfs_fop_write+0x114/0x180)
[   77.686330] [<c03cd2d0>] (kernfs_fop_write) from [<c035d48c>] (__vfs_write+0x1c/0x154)
[   77.686367] [<c035d48c>] (__vfs_write) from [<c035f9e8>] (vfs_write+0xb8/0x198)
[   77.686399] [<c035f9e8>] (vfs_write) from [<c035fbc0>] (ksys_write+0x3c/0x74)
[   77.686427] [<c035fbc0>] (ksys_write) from [<c0201000>] (ret_fast_syscall+0x0/0x4c)
[   77.686441] Exception stack(0xe9365fa8 to 0xe9365ff0)
[   77.686465] 5fa0:                   00000004 beef8b28 00000004 beef8b28 00000004 00000000
[   77.686493] 5fc0: 00000004 beef8b28 02319170 00000004 beef8b28 00000004 b6f3d900 beef8b74
[   77.686513] 5fe0: 0000006c beef8a98 b6c0adac b6c66534
[   77.686527] ---[ end trace f4ee5df14e8ea0ef ]---
[   77.686725] elan_i2c 4-0015: invalid report id data (ff)
[   77.899553] dwmmc_rockchip ff0d0000.dwmmc: Successfully tuned phase to 196
[   78.761515] OOM killer enabled.
[   78.764043] Restarting tasks ... done.
[   78.771356] PM: suspend exit
[   79.269699] dwmmc_rockchip ff0c0000.dwmmc: Busy; trying anyway
[   79.772227] mmc_host mmc0: Timeout sending command (cmd 0x202000 arg 0x0 status 0x80202000)
[   79.788555] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[   80.111632] mmc_host mmc0: Bus speed (slot 0) = 148500000Hz (slot req 150000000Hz, actual 148500000HZ div = 0)
[   80.705915] dwmmc_rockchip ff0c0000.dwmmc: Successfully tuned phase to 217

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] cros_ec_debugfs causes a WARNING trace during suspend on ASUS C201
  2019-03-19 10:36 [BUG] cros_ec_debugfs causes a WARNING trace during suspend on ASUS C201 Urja Rannikko
@ 2019-03-19 13:37 ` Guenter Roeck
  2019-03-19 19:26   ` Benson Leung
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2019-03-19 13:37 UTC (permalink / raw)
  To: Urja Rannikko
  Cc: linux-kernel, Benson Leung, Enric Balletbo i Serra, Guenter Roeck

Hi,

On Tue, Mar 19, 2019 at 3:37 AM Urja Rannikko <urjaman@gmail.com> wrote:
>
> Hi,
>
> I was testing 5.1-rc1 on my C201 when i found this, dmesg of a
> suspend/resume attached.
>
> Based on a quick look at the code it looks like the reason is that the
> suspend and resume calls try to cancel/schedule log_poll_work
> unconditionally but this device doesnt support reading the console log
> so the delayed work struct was never initialized.
>

Thanks a lot for the note. I'll send a fix later today.

Guenter

>
> --
> Urja Rannikko

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] cros_ec_debugfs causes a WARNING trace during suspend on ASUS C201
  2019-03-19 13:37 ` Guenter Roeck
@ 2019-03-19 19:26   ` Benson Leung
  0 siblings, 0 replies; 3+ messages in thread
From: Benson Leung @ 2019-03-19 19:26 UTC (permalink / raw)
  To: Guenter Roeck, Urja Rannikko
  Cc: linux-kernel, Benson Leung, Enric Balletbo i Serra,
	Guenter Roeck, bleung

[-- Attachment #1: Type: text/plain, Size: 928 bytes --]

Hi Guenter, Urja,

On Tue, Mar 19, 2019 at 06:37:08AM -0700, Guenter Roeck wrote:
> Hi,
> 
> On Tue, Mar 19, 2019 at 3:37 AM Urja Rannikko <urjaman@gmail.com> wrote:
> >
> > Hi,
> >
> > I was testing 5.1-rc1 on my C201 when i found this, dmesg of a
> > suspend/resume attached.
> >
> > Based on a quick look at the code it looks like the reason is that the
> > suspend and resume calls try to cancel/schedule log_poll_work
> > unconditionally but this device doesnt support reading the console log
> > so the delayed work struct was never initialized.
> >
> 
> Thanks a lot for the note. I'll send a fix later today.
> 
> Guenter
> 

Thanks for the report and quick fix. Guenter's fix has been merged and should
be in 5.1-rc2 when Linus cuts it.

Thanks,
Benson

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-19 19:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-19 10:36 [BUG] cros_ec_debugfs causes a WARNING trace during suspend on ASUS C201 Urja Rannikko
2019-03-19 13:37 ` Guenter Roeck
2019-03-19 19:26   ` Benson Leung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).