Commit 5a0266af authored by Mugunthan V N's avatar Mugunthan V N Committed by David S. Miller

drivers: net: cpsw: fix disabling of tx interrupt in rx isr

In commit 'c03abd84 ("net: ethernet: cpsw: don't requests
IRQs we don't use")', common isr is split into tx and rx, but
in rx isr tx interrupt is also disabledi in cpsw_disable_irq().
So tx interrupts are not handled during rx interrupts and rx
napi completion and results in poor tx performance by 40Mbps.
Fixing by disabling only rx interrupt in rx isr.

Cc: Felipe Balbi <balbi@ti.com>
Cc: <stable@vger.kernel.org> # v4.0+
Signed-off-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent adb35050
...@@ -138,19 +138,6 @@ do { \ ...@@ -138,19 +138,6 @@ do { \
#define CPSW_CMINTMAX_INTVL (1000 / CPSW_CMINTMIN_CNT) #define CPSW_CMINTMAX_INTVL (1000 / CPSW_CMINTMIN_CNT)
#define CPSW_CMINTMIN_INTVL ((1000 / CPSW_CMINTMAX_CNT) + 1) #define CPSW_CMINTMIN_INTVL ((1000 / CPSW_CMINTMAX_CNT) + 1)
#define cpsw_enable_irq(priv) \
do { \
u32 i; \
for (i = 0; i < priv->num_irqs; i++) \
enable_irq(priv->irqs_table[i]); \
} while (0)
#define cpsw_disable_irq(priv) \
do { \
u32 i; \
for (i = 0; i < priv->num_irqs; i++) \
disable_irq_nosync(priv->irqs_table[i]); \
} while (0)
#define cpsw_slave_index(priv) \ #define cpsw_slave_index(priv) \
((priv->data.dual_emac) ? priv->emac_port : \ ((priv->data.dual_emac) ? priv->emac_port : \
priv->data.active_slave) priv->data.active_slave)
...@@ -783,7 +770,7 @@ static irqreturn_t cpsw_rx_interrupt(int irq, void *dev_id) ...@@ -783,7 +770,7 @@ static irqreturn_t cpsw_rx_interrupt(int irq, void *dev_id)
cpsw_intr_disable(priv); cpsw_intr_disable(priv);
if (priv->irq_enabled == true) { if (priv->irq_enabled == true) {
cpsw_disable_irq(priv); disable_irq_nosync(priv->irqs_table[0]);
priv->irq_enabled = false; priv->irq_enabled = false;
} }
...@@ -819,7 +806,7 @@ static int cpsw_poll(struct napi_struct *napi, int budget) ...@@ -819,7 +806,7 @@ static int cpsw_poll(struct napi_struct *napi, int budget)
prim_cpsw = cpsw_get_slave_priv(priv, 0); prim_cpsw = cpsw_get_slave_priv(priv, 0);
if (prim_cpsw->irq_enabled == false) { if (prim_cpsw->irq_enabled == false) {
prim_cpsw->irq_enabled = true; prim_cpsw->irq_enabled = true;
cpsw_enable_irq(priv); enable_irq(priv->irqs_table[0]);
} }
} }
...@@ -1335,7 +1322,7 @@ static int cpsw_ndo_open(struct net_device *ndev) ...@@ -1335,7 +1322,7 @@ static int cpsw_ndo_open(struct net_device *ndev)
if (prim_cpsw->irq_enabled == false) { if (prim_cpsw->irq_enabled == false) {
if ((priv == prim_cpsw) || !netif_running(prim_cpsw->ndev)) { if ((priv == prim_cpsw) || !netif_running(prim_cpsw->ndev)) {
prim_cpsw->irq_enabled = true; prim_cpsw->irq_enabled = true;
cpsw_enable_irq(prim_cpsw); enable_irq(prim_cpsw->irqs_table[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