Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22720b71 authored by Sneh Shah's avatar Sneh Shah
Browse files

net: stmmac: Reset mmc counters on read



Reset mmc counters on read to fix wrong stats in ethtool.

Change-Id: I572be9a3913f96e1feb5a845ee17a17e73be6262
Signed-off-by: default avatarSneh Shah <snehshah@codeaurora.org>
parent a0b558b7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -175,6 +175,8 @@ extern struct stmmac_emb_smmu_cb_ctx stmmac_emb_smmu_ctx;

#define MICREL_PHY_ID 0x00221620

#define MMC_CONFIG 0x24

int ethqos_handle_prv_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
int ethqos_init_pps(struct stmmac_priv *priv);

+3 −0
Original line number Diff line number Diff line
@@ -544,6 +544,9 @@ static void stmmac_get_ethtool_stats(struct net_device *dev,
	u32 tx_queues_count = priv->plat->tx_queues_to_use;
	int i, j = 0;

	/* enable reset on read for mmc counter */
	writel_relaxed(MMC_CONFIG, priv->mmcaddr);

	/* Update the DMA HW counters for dwmac10/100 */
	if (priv->hw->dma->dma_diagnostic_fr)
		priv->hw->dma->dma_diagnostic_fr(&dev->stats,