]> git.baikalelectronics.ru Git - kernel.git/commitdiff
igc: Add Receive Error Counter
authorSasha Neftin <sasha.neftin@intel.com>
Tue, 19 May 2020 14:55:42 +0000 (17:55 +0300)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 29 May 2020 03:30:06 +0000 (20:30 -0700)
Receive error counter reflect total number of non-filtered
packets received with errors. This includes: CRC error,
symbol error, Rx data error and carrier extend error.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igc/igc_mac.c
drivers/net/ethernet/intel/igc/igc_main.c
drivers/net/ethernet/intel/igc/igc_regs.h

index 9de70a24cb9e0b2de938c0c67e134d629ac00783..a5a087e1ac022278098ac1ccde47181bab81cdb2 100644 (file)
@@ -241,6 +241,7 @@ void igc_clear_hw_cntrs_base(struct igc_hw *hw)
        rd32(IGC_MCC);
        rd32(IGC_LATECOL);
        rd32(IGC_COLC);
+       rd32(IGC_RERC);
        rd32(IGC_DC);
        rd32(IGC_SEC);
        rd32(IGC_RLEC);
index 662f06a647e65c171996c932d65d3935d7ba631a..e0c45ffa12c4cbeda9ffe6bc6686c35ca97c4b41 100644 (file)
@@ -3740,6 +3740,7 @@ void igc_update_stats(struct igc_adapter *adapter)
 
        adapter->stats.tpt += rd32(IGC_TPT);
        adapter->stats.colc += rd32(IGC_COLC);
+       adapter->stats.colc += rd32(IGC_RERC);
 
        adapter->stats.algnerrc += rd32(IGC_ALGNERRC);
 
index a3e4ec9229487ff9780f943a4064f69988cd4f71..7ac3b611708c81e3c46b7ec1b01b47390406b1c5 100644 (file)
 #define IGC_MCC                0x0401C  /* Multiple Collision Count - R/clr */
 #define IGC_LATECOL    0x04020  /* Late Collision Count - R/clr */
 #define IGC_COLC       0x04028  /* Collision Count - R/clr */
+#define IGC_RERC       0x0402C  /* Receive Error Count - R/clr */
 #define IGC_DC         0x04030  /* Defer Count - R/clr */
 #define IGC_TNCRS      0x04034  /* Tx-No CRS - R/clr */
 #define IGC_SEC                0x04038  /* Sequence Error Count - R/clr */