Commit b5d7a069 authored by Iyappan Subramanian's avatar Iyappan Subramanian Committed by David S. Miller

drivers: net: xgene: fix extra IRQ issue

For interrupt controller that doesn't support irq_disable and hardware
with level interrupt, an extra interrupt may be pending. This patch fixes
the issue by setting IRQ_DISABLE_UNLAZY flag for the interrupt line,
as suggested by,

'commit e9849777 ("genirq: Add flag to force mask in
		       disable_irq[_nosync]()")'
Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
Tested-by: default avatarToan Le <toanle@apm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fa0dc04d
...@@ -628,6 +628,7 @@ static int xgene_enet_register_irq(struct net_device *ndev) ...@@ -628,6 +628,7 @@ static int xgene_enet_register_irq(struct net_device *ndev)
int ret; int ret;
ring = pdata->rx_ring; ring = pdata->rx_ring;
irq_set_status_flags(ring->irq, IRQ_DISABLE_UNLAZY);
ret = devm_request_irq(dev, ring->irq, xgene_enet_rx_irq, ret = devm_request_irq(dev, ring->irq, xgene_enet_rx_irq,
IRQF_SHARED, ring->irq_name, ring); IRQF_SHARED, ring->irq_name, ring);
if (ret) if (ret)
...@@ -635,6 +636,7 @@ static int xgene_enet_register_irq(struct net_device *ndev) ...@@ -635,6 +636,7 @@ static int xgene_enet_register_irq(struct net_device *ndev)
if (pdata->cq_cnt) { if (pdata->cq_cnt) {
ring = pdata->tx_ring->cp_ring; ring = pdata->tx_ring->cp_ring;
irq_set_status_flags(ring->irq, IRQ_DISABLE_UNLAZY);
ret = devm_request_irq(dev, ring->irq, xgene_enet_rx_irq, ret = devm_request_irq(dev, ring->irq, xgene_enet_rx_irq,
IRQF_SHARED, ring->irq_name, ring); IRQF_SHARED, ring->irq_name, ring);
if (ret) { if (ret) {
...@@ -649,15 +651,19 @@ static int xgene_enet_register_irq(struct net_device *ndev) ...@@ -649,15 +651,19 @@ static int xgene_enet_register_irq(struct net_device *ndev)
static void xgene_enet_free_irq(struct net_device *ndev) static void xgene_enet_free_irq(struct net_device *ndev)
{ {
struct xgene_enet_pdata *pdata; struct xgene_enet_pdata *pdata;
struct xgene_enet_desc_ring *ring;
struct device *dev; struct device *dev;
pdata = netdev_priv(ndev); pdata = netdev_priv(ndev);
dev = ndev_to_dev(ndev); dev = ndev_to_dev(ndev);
devm_free_irq(dev, pdata->rx_ring->irq, pdata->rx_ring); ring = pdata->rx_ring;
irq_clear_status_flags(ring->irq, IRQ_DISABLE_UNLAZY);
devm_free_irq(dev, ring->irq, ring);
if (pdata->cq_cnt) { if (pdata->cq_cnt) {
devm_free_irq(dev, pdata->tx_ring->cp_ring->irq, ring = pdata->tx_ring->cp_ring;
pdata->tx_ring->cp_ring); irq_clear_status_flags(ring->irq, IRQ_DISABLE_UNLAZY);
devm_free_irq(dev, ring->irq, ring);
} }
} }
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/acpi.h> #include <linux/acpi.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/efi.h> #include <linux/efi.h>
#include <linux/irq.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/of_net.h> #include <linux/of_net.h>
......
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