net: dsa: mv88e6xxx: Fix statistics on mv88e6161 [Linux 5.0]

net: dsa: mv88e6xxx: Fix statistics on mv88e6161 [Linux 5.0]

This Linux kernel change "net: dsa: mv88e6xxx: Fix statistics on mv88e6161" is included in the Linux 5.0 release. This change is authored by Andrew Lunn <andrew [at]> on Fri Mar 1 23:43:39 2019 +0100. The commit for this change in Linux stable tree is a6da21b (patch).

net: dsa: mv88e6xxx: Fix statistics on mv88e6161

Despite what the datesheet says, the silicon implements the older way
of snapshoting the statistics. Change the op.

Reported-by: [email protected]
Tested-by: [email protected]
Fixes: 0ac64c394900 ("net: dsa: mv88e6xxx: mv88e6161 uses mv88e6320 stats snapshot")
Signed-off-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index f5cad42..7e3c00b 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -3093,7 +3093,7 @@ static int mv88e6xxx_set_eeprom(struct dsa_switch *ds,
    .port_disable_pri_override = mv88e6xxx_port_disable_pri_override,
    .port_link_state = mv88e6352_port_link_state,
    .port_get_cmode = mv88e6185_port_get_cmode,
-   .stats_snapshot = mv88e6320_g1_stats_snapshot,
+   .stats_snapshot = mv88e6xxx_g1_stats_snapshot,
    .stats_set_histogram = mv88e6095_g1_stats_set_histogram,
    .stats_get_sset_count = mv88e6095_stats_get_sset_count,
    .stats_get_strings = mv88e6095_stats_get_strings,

Leave a Reply

Your email address will not be published. Required fields are marked *