]> git.baikalelectronics.ru Git - kernel.git/commit
net: macb: fix call to pm_runtime in the suspend/resume functions
authorNicolas Ferre <nicolas.ferre@microchip.com>
Fri, 10 Jul 2020 12:46:45 +0000 (14:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Jul 2020 21:29:38 +0000 (14:29 -0700)
commitfb0016f5e55c2902022f4d0a4b3f716d71f73010
tree6d134feb3286bd4131a0876627f9a1bc5bf680fd
parent371f36659f4b38a7cee06769d93876939af2ae5a
net: macb: fix call to pm_runtime in the suspend/resume functions

The calls to pm_runtime_force_suspend/resume() functions are only
relevant if the device is not configured to act as a WoL wakeup source.
Add the device_may_wakeup() test before calling them.

Fixes: 18f5ab9d5ed0 ("net: macb: add wake-on-lan support via magic packet")
Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
Cc: Harini Katakam <harini.katakam@xilinx.com>
Cc: Sergio Prado <sergio.prado@e-labworks.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb_main.c