]> 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)
commit73ddce7e696ac2327b164eecbe5e4da8f598495f
tree8ad59af9f3714779aecebab2bb106935f4244c13
parent0ce2395a0bc5de1be1cd67ee624957d2c530f5f6
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