Commit d5b8d640 authored by Sudeep Holla's avatar Sudeep Holla Committed by David S. Miller

net: gianfar: remove misuse of IRQF_NO_SUSPEND flag

The device is set as wakeup capable using proper wakeup API but the
driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source
which is incorrect.

This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
enable_irq_wake instead.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
Cc: Kevin Hao <haokexin@gmail.com>
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Acked-by: default avatarClaudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6ae459bd
...@@ -1970,8 +1970,7 @@ static int register_grp_irqs(struct gfar_priv_grp *grp) ...@@ -1970,8 +1970,7 @@ static int register_grp_irqs(struct gfar_priv_grp *grp)
/* Install our interrupt handlers for Error, /* Install our interrupt handlers for Error,
* Transmit, and Receive * Transmit, and Receive
*/ */
err = request_irq(gfar_irq(grp, ER)->irq, gfar_error, err = request_irq(gfar_irq(grp, ER)->irq, gfar_error, 0,
IRQF_NO_SUSPEND,
gfar_irq(grp, ER)->name, grp); gfar_irq(grp, ER)->name, grp);
if (err < 0) { if (err < 0) {
netif_err(priv, intr, dev, "Can't get IRQ %d\n", netif_err(priv, intr, dev, "Can't get IRQ %d\n",
...@@ -1979,6 +1978,8 @@ static int register_grp_irqs(struct gfar_priv_grp *grp) ...@@ -1979,6 +1978,8 @@ static int register_grp_irqs(struct gfar_priv_grp *grp)
goto err_irq_fail; goto err_irq_fail;
} }
enable_irq_wake(gfar_irq(grp, ER)->irq);
err = request_irq(gfar_irq(grp, TX)->irq, gfar_transmit, 0, err = request_irq(gfar_irq(grp, TX)->irq, gfar_transmit, 0,
gfar_irq(grp, TX)->name, grp); gfar_irq(grp, TX)->name, grp);
if (err < 0) { if (err < 0) {
...@@ -1994,14 +1995,14 @@ static int register_grp_irqs(struct gfar_priv_grp *grp) ...@@ -1994,14 +1995,14 @@ static int register_grp_irqs(struct gfar_priv_grp *grp)
goto rx_irq_fail; goto rx_irq_fail;
} }
} else { } else {
err = request_irq(gfar_irq(grp, TX)->irq, gfar_interrupt, err = request_irq(gfar_irq(grp, TX)->irq, gfar_interrupt, 0,
IRQF_NO_SUSPEND,
gfar_irq(grp, TX)->name, grp); gfar_irq(grp, TX)->name, grp);
if (err < 0) { if (err < 0) {
netif_err(priv, intr, dev, "Can't get IRQ %d\n", netif_err(priv, intr, dev, "Can't get IRQ %d\n",
gfar_irq(grp, TX)->irq); gfar_irq(grp, TX)->irq);
goto err_irq_fail; goto err_irq_fail;
} }
enable_irq_wake(gfar_irq(grp, TX)->irq);
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment