Re: [PATCH 15/16] net: phy: adin: add ethtool get_stats support

2019-08-07 Thread Ardelean, Alexandru
On Tue, 2019-08-06 at 17:46 +0200, Andrew Lunn wrote: > [External] > > On Tue, Aug 06, 2019 at 07:11:57AM +, Ardelean, Alexandru wrote: > > On Mon, 2019-08-05 at 17:28 +0200, Andrew Lunn wrote: > > > [External] > > > > > > > +struct adin_hw_stat { > > > > + const char *string; > > > >

Re: [PATCH 15/16] net: phy: adin: add ethtool get_stats support

2019-08-06 Thread Andrew Lunn
On Tue, Aug 06, 2019 at 07:11:57AM +, Ardelean, Alexandru wrote: > On Mon, 2019-08-05 at 17:28 +0200, Andrew Lunn wrote: > > [External] > > > > > +struct adin_hw_stat { > > > + const char *string; > > > +static void adin_get_strings(struct phy_device *phydev, u8 *data) > > > +{ > > > + int i;

Re: [PATCH 15/16] net: phy: adin: add ethtool get_stats support

2019-08-06 Thread Ardelean, Alexandru
On Mon, 2019-08-05 at 17:30 +0200, Andrew Lunn wrote: > [External] > > On Mon, Aug 05, 2019 at 07:54:52PM +0300, Alexandru Ardelean wrote: > > This change implements retrieving all the error counters from the PHY. > > The PHY supports several error counters/stats. The `Mean Square Errors` > >

Re: [PATCH 15/16] net: phy: adin: add ethtool get_stats support

2019-08-06 Thread Ardelean, Alexandru
On Mon, 2019-08-05 at 17:28 +0200, Andrew Lunn wrote: > [External] > > > +struct adin_hw_stat { > > + const char *string; > > +static void adin_get_strings(struct phy_device *phydev, u8 *data) > > +{ > > + int i; > > + > > + for (i = 0; i < ARRAY_SIZE(adin_hw_stats); i++) { > > +

Re: [PATCH 15/16] net: phy: adin: add ethtool get_stats support

2019-08-05 Thread Andrew Lunn
On Mon, Aug 05, 2019 at 07:54:52PM +0300, Alexandru Ardelean wrote: > This change implements retrieving all the error counters from the PHY. > The PHY supports several error counters/stats. The `Mean Square Errors` > status values are only valie when a link is established, and shouldn't be >

Re: [PATCH 15/16] net: phy: adin: add ethtool get_stats support

2019-08-05 Thread Andrew Lunn
> +struct adin_hw_stat { > + const char *string; > +static void adin_get_strings(struct phy_device *phydev, u8 *data) > +{ > + int i; > + > + for (i = 0; i < ARRAY_SIZE(adin_hw_stats); i++) { > + memcpy(data + i * ETH_GSTRING_LEN, > +

[PATCH 15/16] net: phy: adin: add ethtool get_stats support

2019-08-05 Thread Alexandru Ardelean
This change implements retrieving all the error counters from the PHY. The PHY supports several error counters/stats. The `Mean Square Errors` status values are only valie when a link is established, and shouldn't be incremented. These values characterize the quality of a signal. The rest of the