summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
diff options
context:
space:
mode:
authorJoao Pinto <Joao.Pinto@synopsys.com>2017-03-15 11:04:49 +0000
committerDavid S. Miller <davem@davemloft.net>2017-03-15 14:44:32 -0700
commitd62a107a4f154c9aa826dbe03ac2322a389b37b5 (patch)
tree25b5fa8a552ad227a43654d823508256c8c30c0e /drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
parent4e593262290c3488ca7ab8b41a5c70c284e12b57 (diff)
downloadlinux-d62a107a4f154c9aa826dbe03ac2322a389b37b5.tar.gz
linux-d62a107a4f154c9aa826dbe03ac2322a389b37b5.tar.bz2
linux-d62a107a4f154c9aa826dbe03ac2322a389b37b5.zip
net: stmmac: prepare dma interrupt treatment for multiple queues
This patch prepares DMA interrupts treatment for multiple queues. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
index 3512d18f626b..fcd8ec8a240b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
@@ -122,11 +122,11 @@ void dwmac4_disable_dma_irq(void __iomem *ioaddr, u32 chan)
}
int dwmac4_dma_interrupt(void __iomem *ioaddr,
- struct stmmac_extra_stats *x)
+ struct stmmac_extra_stats *x, u32 chan)
{
int ret = 0;
- u32 intr_status = readl(ioaddr + DMA_CHAN_STATUS(0));
+ u32 intr_status = readl(ioaddr + DMA_CHAN_STATUS(chan));
/* ABNORMAL interrupts */
if (unlikely(intr_status & DMA_CHAN_STATUS_AIS)) {
@@ -153,7 +153,7 @@ int dwmac4_dma_interrupt(void __iomem *ioaddr,
if (likely(intr_status & DMA_CHAN_STATUS_RI)) {
u32 value;
- value = readl(ioaddr + DMA_CHAN_INTR_ENA(STMMAC_CHAN0));
+ value = readl(ioaddr + DMA_CHAN_INTR_ENA(chan));
/* to schedule NAPI on real RIE event. */
if (likely(value & DMA_CHAN_INTR_ENA_RIE)) {
x->rx_normal_irq_n++;
@@ -172,7 +172,7 @@ int dwmac4_dma_interrupt(void __iomem *ioaddr,
* status [21-0] expect reserved bits [5-3]
*/
writel((intr_status & 0x3fffc7),
- ioaddr + DMA_CHAN_STATUS(STMMAC_CHAN0));
+ ioaddr + DMA_CHAN_STATUS(chan));
return ret;
}