Skip to content

Commit 3fcdf2d

Browse files
ffainellidavem330
authored andcommitted
net: bcmgenet: Support wake-up from s2idle
When we suspend into s2idle we also need to enable the interrupt line that generates the MPD and HFB interrupts towards the host CPU interrupt controller (typically the ARM GIC or MIPS L1) to make it exit s2idle. When we suspend into other modes such as "standby" or "mem" we engage a power management state machine which will gate off the CPU L1 controller (priv->irq0) and ungate the side band wake-up interrupt (priv->wol_irq). It is safe to have both enabled as wake-up sources because they are mutually exclusive given any suspend mode. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5f1eb1f commit 3fcdf2d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,18 @@ int bcmgenet_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
7777
if (wol->wolopts) {
7878
device_set_wakeup_enable(kdev, 1);
7979
/* Avoid unbalanced enable_irq_wake calls */
80-
if (priv->wol_irq_disabled)
80+
if (priv->wol_irq_disabled) {
8181
enable_irq_wake(priv->wol_irq);
82+
enable_irq_wake(priv->irq0);
83+
}
8284
priv->wol_irq_disabled = false;
8385
} else {
8486
device_set_wakeup_enable(kdev, 0);
8587
/* Avoid unbalanced disable_irq_wake calls */
86-
if (!priv->wol_irq_disabled)
88+
if (!priv->wol_irq_disabled) {
8789
disable_irq_wake(priv->wol_irq);
90+
disable_irq_wake(priv->irq0);
91+
}
8892
priv->wol_irq_disabled = true;
8993
}
9094

0 commit comments

Comments
 (0)