]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: aquantia: add SGMII statistics
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 31 Mar 2019 15:42:24 +0000 (17:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Apr 2019 01:13:36 +0000 (18:13 -0700)
commit55742c8a17c37f10825cb9b8571f9fd4974517a2
tree8ad59af9f3714779aecebab2bb106935f4244c13
parentb60e9f9e7bad5e3ff762697ddc6a6ab27a067f8f
net: phy: aquantia: add SGMII statistics

The AQR107 family has SGMII statistics counters. Let's expose them to
ethtool. To interpret the counters correctly one has to be aware that
rx on SGMII side is tx on ethernet side. The counters are populated
by the chip in 100Mbps/1Gbps mode only.

v2:
- add constant AQR107_SGMII_STAT_SZ
- add struct aqr107_priv to be prepared for more private data fields
- let aqr107_get_stat() return U64_MAX in case of an error

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/aquantia_main.c