diff options
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c index 6c5092e7771c..c5e25580a43f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | |||
@@ -263,6 +263,7 @@ static int dwxgmac2_dma_interrupt(void __iomem *ioaddr, | |||
263 | struct stmmac_extra_stats *x, u32 chan) | 263 | struct stmmac_extra_stats *x, u32 chan) |
264 | { | 264 | { |
265 | u32 intr_status = readl(ioaddr + XGMAC_DMA_CH_STATUS(chan)); | 265 | u32 intr_status = readl(ioaddr + XGMAC_DMA_CH_STATUS(chan)); |
266 | u32 intr_en = readl(ioaddr + XGMAC_DMA_CH_INT_EN(chan)); | ||
266 | int ret = 0; | 267 | int ret = 0; |
267 | 268 | ||
268 | /* ABNORMAL interrupts */ | 269 | /* ABNORMAL interrupts */ |
@@ -282,8 +283,7 @@ static int dwxgmac2_dma_interrupt(void __iomem *ioaddr, | |||
282 | x->normal_irq_n++; | 283 | x->normal_irq_n++; |
283 | 284 | ||
284 | if (likely(intr_status & XGMAC_RI)) { | 285 | if (likely(intr_status & XGMAC_RI)) { |
285 | u32 value = readl(ioaddr + XGMAC_DMA_CH_INT_EN(chan)); | 286 | if (likely(intr_en & XGMAC_RIE)) { |
286 | if (likely(value & XGMAC_RIE)) { | ||
287 | x->rx_normal_irq_n++; | 287 | x->rx_normal_irq_n++; |
288 | ret |= handle_rx; | 288 | ret |= handle_rx; |
289 | } | 289 | } |
@@ -295,7 +295,7 @@ static int dwxgmac2_dma_interrupt(void __iomem *ioaddr, | |||
295 | } | 295 | } |
296 | 296 | ||
297 | /* Clear interrupts */ | 297 | /* Clear interrupts */ |
298 | writel(~0x0, ioaddr + XGMAC_DMA_CH_STATUS(chan)); | 298 | writel(intr_en & intr_status, ioaddr + XGMAC_DMA_CH_STATUS(chan)); |
299 | 299 | ||
300 | return ret; | 300 | return ret; |
301 | } | 301 | } |