amd-xgbe: Add receive buffer unavailable statistic
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / amd / xgbe / xgbe-drv.c
index aae9d5ecd1822b16a2812de3bee503f59113adaa..24212d256a011bbf7ba3be84500b293444b00b96 100644 (file)
@@ -360,6 +360,9 @@ static irqreturn_t xgbe_isr(int irq, void *data)
                        }
                }
 
+               if (XGMAC_GET_BITS(dma_ch_isr, DMA_CH_SR, RBU))
+                       pdata->ext_stats.rx_buffer_unavailable++;
+
                /* Restart the device on a Fatal Bus Error */
                if (XGMAC_GET_BITS(dma_ch_isr, DMA_CH_SR, FBE))
                        schedule_work(&pdata->restart_work);