diff options
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index fc0d5fa65ad4..734286ebe5ef 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
@@ -2244,19 +2244,14 @@ static bool rtl8169_do_counters(struct net_device *dev, u32 counter_cmd) | |||
2244 | void __iomem *ioaddr = tp->mmio_addr; | 2244 | void __iomem *ioaddr = tp->mmio_addr; |
2245 | dma_addr_t paddr = tp->counters_phys_addr; | 2245 | dma_addr_t paddr = tp->counters_phys_addr; |
2246 | u32 cmd; | 2246 | u32 cmd; |
2247 | bool ret; | ||
2248 | 2247 | ||
2249 | RTL_W32(CounterAddrHigh, (u64)paddr >> 32); | 2248 | RTL_W32(CounterAddrHigh, (u64)paddr >> 32); |
2249 | RTL_R32(CounterAddrHigh); | ||
2250 | cmd = (u64)paddr & DMA_BIT_MASK(32); | 2250 | cmd = (u64)paddr & DMA_BIT_MASK(32); |
2251 | RTL_W32(CounterAddrLow, cmd); | 2251 | RTL_W32(CounterAddrLow, cmd); |
2252 | RTL_W32(CounterAddrLow, cmd | counter_cmd); | 2252 | RTL_W32(CounterAddrLow, cmd | counter_cmd); |
2253 | 2253 | ||
2254 | ret = rtl_udelay_loop_wait_low(tp, &rtl_counters_cond, 10, 1000); | 2254 | return rtl_udelay_loop_wait_low(tp, &rtl_counters_cond, 10, 1000); |
2255 | |||
2256 | RTL_W32(CounterAddrLow, 0); | ||
2257 | RTL_W32(CounterAddrHigh, 0); | ||
2258 | |||
2259 | return ret; | ||
2260 | } | 2255 | } |
2261 | 2256 | ||
2262 | static bool rtl8169_reset_counters(struct net_device *dev) | 2257 | static bool rtl8169_reset_counters(struct net_device *dev) |