aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2018-10-11 08:28:26 -0400
committerDavid S. Miller <davem@davemloft.net>2018-10-11 15:04:08 -0400
commit2a1e89df785082a0fd7264ca6d3d834abe84fa25 (patch)
treea3d7e659ba40da4b3aff973ece4e3b40c38262c6
parent26450608348e91a782691dbfcc836478f4381071 (diff)
net: socionext: clear rx irq correctly
commit 63ae7949e94a ("net: socionext: Use descriptor info instead of MMIO reads on Rx") removed constant mmio reads from the driver and started using a descriptor field to check if packet should be processed. This lead the napi rx handler being constantly called while no packets needed processing and ksoftirq getting 100% cpu usage. Issue one mmio read to clear the irq correcty after processing packets Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/socionext/netsec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c
index 7aa5ebb6766c..4289ccb26e4e 100644
--- a/drivers/net/ethernet/socionext/netsec.c
+++ b/drivers/net/ethernet/socionext/netsec.c
@@ -735,8 +735,11 @@ static int netsec_process_rx(struct netsec_priv *priv, int budget)
735 u16 idx = dring->tail; 735 u16 idx = dring->tail;
736 struct netsec_de *de = dring->vaddr + (DESC_SZ * idx); 736 struct netsec_de *de = dring->vaddr + (DESC_SZ * idx);
737 737
738 if (de->attr & (1U << NETSEC_RX_PKT_OWN_FIELD)) 738 if (de->attr & (1U << NETSEC_RX_PKT_OWN_FIELD)) {
739 /* reading the register clears the irq */
740 netsec_read(priv, NETSEC_REG_NRM_RX_PKTCNT);
739 break; 741 break;
742 }
740 743
741 /* This barrier is needed to keep us from reading 744 /* This barrier is needed to keep us from reading
742 * any other fields out of the netsec_de until we have 745 * any other fields out of the netsec_de until we have