Skip to content

Commit

Permalink
ODROID-N2: net: stmmac: enable/disable WOL irq
Browse files Browse the repository at this point in the history
[    9.030792] ------------[ cut here ]------------
[    9.030794] Unbalanced IRQ 14 wake disable
[    9.030802] WARNING: CPU: 3 PID: 1234 at kernel/irq/manage.c:901 irq_set_irq_wake+0xf4/0x158
[    9.030815] Modules linked in: rfkill dm_multipath dm_mod dax snd_soc_hdmi_codec dw_hdmi_i2s_audio sg uas meson_vdec(C) v4l2_mem2mem videobuf2_dma_contig videobuf2_v4l2 videobuf2_memops rtc_pcf8563 panfrost videobuf2_common gpu_sched meson_dw_hdmi snd_soc_meson_g12a_tohdmitx videodev meson_rng ir_nec_decoder snd_soc_meson_axg_sound_card snd_soc_meson_g12a_toacodec snd_soc_meson_card_utils dw_hdmi mc meson_drm rng_core snd_soc_meson_codec_glue meson_ir snd_soc_meson_axg_spdifout snd_soc_meson_axg_tdmout axg_audio meson_canvas snd_soc_meson_axg_frddr sclk_div snd_soc_meson_axg_toddr clk_phase reset_meson_audio_arb snd_soc_meson_axg_tdmin snd_soc_meson_axg_fifo snd_soc_meson_t9015 meson_gxbb_wdt snd_soc_meson_axg_tdm_interface snd_soc_meson_axg_tdm_formatter snd_soc_simple_amplifier snd_soc_spdif_tx pwm_fan sch_fq_codel fuse ip_tables x_tables
[    9.030902] CPU: 3 PID: 1234 Comm: NetworkManager Tainted: G         C        5.14.9+ hardkernel#53
[    9.030906] Hardware name: Hardkernel ODROID-N2 (DT)
[    9.030909] pstate: 400000c5 (nZcv daIF -PAN -UAO -TCO BTYPE=--)
[    9.030913] pc : irq_set_irq_wake+0xf4/0x158
[    9.030917] lr : irq_set_irq_wake+0xf4/0x158
[    9.030921] sp : ffff80001240bb00
[    9.030923] x29: ffff80001240bb00 x28: ffff00000652d580 x27: 0000000000000000
[    9.030929] x26: ffff0000065d0940 x25: ffff0000065d0000 x24: ffff800011462000
[    9.030935] x23: 000000000000000e x22: 0000000000000000 x21: 00000000ffffffea
[    9.030940] x20: ffff8000114c1000 x19: ffff000003a04400 x18: ffffffffffffffff
[    9.030946] x17: 0000000000000000 x16: 0000000000000000 x15: ffff8000114c1c68
[    9.030951] x14: 00000000000001f4 x13: ffff80001240b7c0 x12: 00000000ffffffea
[    9.030956] x11: ffff80001195d220 x10: ffff8000119451e0 x9 : ffff800011945238
[    9.030962] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : 0000000000000001
[    9.030968] x5 : ffff0000b73ba768 x4 : 0000000000000000 x3 : 0000000000000027
[    9.030973] x2 : 0000000000000023 x1 : 01a8c2b33db43a00 x0 : 0000000000000000
[    9.030979] Call trace:
[    9.030981]  irq_set_irq_wake+0xf4/0x158
[    9.030985]  stmmac_set_wol+0x1f8/0x210
[    9.030990]  dev_ethtool+0x3dc/0x1fa0
[    9.030997]  dev_ioctl+0x29c/0x3a8
[    9.031001]  sock_do_ioctl+0x114/0x2b8
[    9.031006]  sock_ioctl+0x3c8/0x4a0
[    9.031009]  __arm64_sys_ioctl+0xac/0xf0
[    9.031014]  invoke_syscall+0x44/0x100
[    9.031020]  el0_svc_common+0x64/0xf8
[    9.031023]  do_el0_svc+0x28/0x90
[    9.031027]  el0_svc+0x24/0x38
[    9.031031]  el0t_64_sync_handler+0x90/0xb8
[    9.031035]  el0t_64_sync+0x178/0x17c
[    9.031039] ---[ end trace 251213c5153922c1 ]---

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I6850ca7c1ebf62f26a73f5491baaf8abfc89edf9
  • Loading branch information
tobetter authored and paralin committed Mar 29, 2022
1 parent 90280f5 commit 09cf2b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,10 +758,12 @@ static int stmmac_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
if (wol->wolopts) {
pr_info("stmmac: wakeup enable\n");
device_set_wakeup_enable(priv->device, 1);
enable_irq_wake(priv->wol_irq);
if (priv->wol_irq != dev->irq)
enable_irq_wake(priv->wol_irq);
} else {
device_set_wakeup_enable(priv->device, 0);
disable_irq_wake(priv->wol_irq);
if (priv->wol_irq != dev->irq)
disable_irq_wake(priv->wol_irq);
}

mutex_lock(&priv->lock);
Expand Down

0 comments on commit 09cf2b0

Please sign in to comment.