mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-13 07:54:14 +00:00
Refreshed all patches. Removed upstreamed: - 203-MIPS-ath79-fix-restart.patch - 330-Revert-MIPS-BCM47XX-Enable-74K-Core-ExternalSync-for.patch - 051-0001-ovl-rename-is_merge-to-is_lowest.patch - 051-0002-ovl-override-creds-with-the-ones-from-the-superblock.patch - 051-0005-ovl-proper-cleanup-of-workdir.patch Altered patches: - 201-extra_optimization.patch - 304-mips_disable_fpu.patch Compile-tested on: ar71xx, cns3xxx, imx6, mpc85xx Runtime-tested on: ar71xx, cns3xxx, imx6, mpc85xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
From: Jisheng Zhang <jszhang@marvell.com>
|
|
Date: Wed, 20 Jan 2016 16:36:25 +0800
|
|
Subject: [PATCH] net: mvneta: fix trivial cut-off issue in
|
|
mvneta_ethtool_update_stats
|
|
|
|
When s->type is T_REG_64, the high 32bits are lost in val. This patch
|
|
fixes this trivial issue.
|
|
|
|
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
|
|
Fixes: 9b0cdefa4cd5 ("net: mvneta: add ethtool statistics")
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
|
|
--- a/drivers/net/ethernet/marvell/mvneta.c
|
|
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
|
@@ -3244,26 +3244,25 @@ static void mvneta_ethtool_update_stats(
|
|
const struct mvneta_statistic *s;
|
|
void __iomem *base = pp->base;
|
|
u32 high, low, val;
|
|
+ u64 val64;
|
|
int i;
|
|
|
|
for (i = 0, s = mvneta_statistics;
|
|
s < mvneta_statistics + ARRAY_SIZE(mvneta_statistics);
|
|
s++, i++) {
|
|
- val = 0;
|
|
-
|
|
switch (s->type) {
|
|
case T_REG_32:
|
|
val = readl_relaxed(base + s->offset);
|
|
+ pp->ethtool_stats[i] += val;
|
|
break;
|
|
case T_REG_64:
|
|
/* Docs say to read low 32-bit then high */
|
|
low = readl_relaxed(base + s->offset);
|
|
high = readl_relaxed(base + s->offset + 4);
|
|
- val = (u64)high << 32 | low;
|
|
+ val64 = (u64)high << 32 | low;
|
|
+ pp->ethtool_stats[i] += val64;
|
|
break;
|
|
}
|
|
-
|
|
- pp->ethtool_stats[i] += val;
|
|
}
|
|
}
|
|
|