mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 22:10:24 +00:00
stmmac: mask mmc interrupts
We need to mask the MMC irq otherwise if we raise the mmc interrupts that are not handled the driver loops in the handler. In fact, by default all mmc counters (only used for stats) are managed in SW and registers are cleared on each READ. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ba9bb431d3
commit
4f795b25ea
@ -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)
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user