* [PATCH net] net: dsa: mv88e6xxx: Fix u64 statistics
@ 2019-02-28 17:14 Andrew Lunn
2019-02-28 20:53 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Lunn @ 2019-02-28 17:14 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Vivien Didelot, Chris Healy, Andrew Lunn
The switch maintains u64 counters for the number of octets sent and
received. These are kept as two u32's which need to be combined. Fix
the combing, which wrongly worked on u16's.
Fixes: 80c4627b2719 ("dsa: mv88x6xxx: Refactor getting a single statistic")
Reported-by: Chris Healy <Chris.Healy@zii.aero>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
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 12fd7ce3f1ff..9d36d2b5fbc6 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -896,7 +896,7 @@ static uint64_t _mv88e6xxx_get_ethtool_stat(struct mv88e6xxx_chip *chip,
default:
return U64_MAX;
}
- value = (((u64)high) << 16) | low;
+ value = (((u64)high) << 32) | low;
return value;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: dsa: mv88e6xxx: Fix u64 statistics
2019-02-28 17:14 [PATCH net] net: dsa: mv88e6xxx: Fix u64 statistics Andrew Lunn
@ 2019-02-28 20:53 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-02-28 20:53 UTC (permalink / raw)
To: andrew; +Cc: netdev, vivien.didelot, Chris.Healy
From: Andrew Lunn <andrew@lunn.ch>
Date: Thu, 28 Feb 2019 18:14:03 +0100
> The switch maintains u64 counters for the number of octets sent and
> received. These are kept as two u32's which need to be combined. Fix
> the combing, which wrongly worked on u16's.
>
> Fixes: 80c4627b2719 ("dsa: mv88x6xxx: Refactor getting a single statistic")
> Reported-by: Chris Healy <Chris.Healy@zii.aero>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Applied and queued up for -stable, thanks Andrew.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-28 20:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-28 17:14 [PATCH net] net: dsa: mv88e6xxx: Fix u64 statistics Andrew Lunn
2019-02-28 20:53 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).