Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276197
b: refs/heads/master
c: 4f795b2
h: refs/heads/master
i:
  276195: fd6a8b7
v: v3
  • Loading branch information
Giuseppe CAVALLARO authored and David S. Miller committed Nov 21, 2011
1 parent 4dad5ca commit ea8d77b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ba9bb431d3156a1c5d4d6f0b8c23b5792e9e9f4f
refs/heads/master: 4f795b25eaf1109c77abfc3b57cef9b993f3aede
14 changes: 9 additions & 5 deletions trunk/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,15 @@ static void stmmac_mmc_setup(struct stmmac_priv *priv)
unsigned int mode = MMC_CNTRL_RESET_ON_READ | MMC_CNTRL_COUNTER_RESET |
MMC_CNTRL_PRESET | MMC_CNTRL_FULL_HALF_PRESET;

/* Do not manage MMC IRQ (FIXME) */
/* Mask MMC irq, counters are managed in SW and registers
* are cleared on each READ eventually. */
dwmac_mmc_intr_all_mask(priv->ioaddr);
dwmac_mmc_ctrl(priv->ioaddr, mode);
memset(&priv->mmc, 0, sizeof(struct stmmac_counters));

if (priv->dma_cap.rmon) {
dwmac_mmc_ctrl(priv->ioaddr, mode);
memset(&priv->mmc, 0, sizeof(struct stmmac_counters));
} else
pr_info(" No MAC Management Counters available");
}

static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv)
Expand Down Expand Up @@ -1012,8 +1017,7 @@ static int stmmac_open(struct net_device *dev)
memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats));
priv->xstats.threshold = tc;

if (priv->dma_cap.rmon)
stmmac_mmc_setup(priv);
stmmac_mmc_setup(priv);

/* Start the ball rolling... */
DBG(probe, DEBUG, "%s: DMA RX/TX processes started...\n", dev->name);
Expand Down

0 comments on commit ea8d77b

Please sign in to comment.