diff options
author | David S. Miller <davem@davemloft.net> | 2011-11-26 14:47:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-26 14:47:03 -0500 |
commit | 6dec4ac4ee1ad894dc0e9647cd3e180f93fc353c (patch) | |
tree | cd71e597bbbe677820bb229c6aedbad412758959 /drivers/net/ethernet/stmicro | |
parent | d6f03f29f7cdf064289f941bf0b838348e996e65 (diff) | |
parent | fc0b927d9a5024e138c4318fe19a590f23e3eeec (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/ipv4/inet_diag.c
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index de71859bb295..20e8267e8e40 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -781,10 +781,15 @@ static void stmmac_mmc_setup(struct stmmac_priv *priv) | |||
781 | unsigned int mode = MMC_CNTRL_RESET_ON_READ | MMC_CNTRL_COUNTER_RESET | | 781 | unsigned int mode = MMC_CNTRL_RESET_ON_READ | MMC_CNTRL_COUNTER_RESET | |
782 | MMC_CNTRL_PRESET | MMC_CNTRL_FULL_HALF_PRESET; | 782 | MMC_CNTRL_PRESET | MMC_CNTRL_FULL_HALF_PRESET; |
783 | 783 | ||
784 | /* Do not manage MMC IRQ (FIXME) */ | 784 | /* Mask MMC irq, counters are managed in SW and registers |
785 | * are cleared on each READ eventually. */ | ||
785 | dwmac_mmc_intr_all_mask(priv->ioaddr); | 786 | dwmac_mmc_intr_all_mask(priv->ioaddr); |
786 | dwmac_mmc_ctrl(priv->ioaddr, mode); | 787 | |
787 | memset(&priv->mmc, 0, sizeof(struct stmmac_counters)); | 788 | if (priv->dma_cap.rmon) { |
789 | dwmac_mmc_ctrl(priv->ioaddr, mode); | ||
790 | memset(&priv->mmc, 0, sizeof(struct stmmac_counters)); | ||
791 | } else | ||
792 | pr_info(" No MAC Management Counters available"); | ||
788 | } | 793 | } |
789 | 794 | ||
790 | static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv) | 795 | static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv) |
@@ -1012,8 +1017,7 @@ static int stmmac_open(struct net_device *dev) | |||
1012 | memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats)); | 1017 | memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats)); |
1013 | priv->xstats.threshold = tc; | 1018 | priv->xstats.threshold = tc; |
1014 | 1019 | ||
1015 | if (priv->dma_cap.rmon) | 1020 | stmmac_mmc_setup(priv); |
1016 | stmmac_mmc_setup(priv); | ||
1017 | 1021 | ||
1018 | /* Start the ball rolling... */ | 1022 | /* Start the ball rolling... */ |
1019 | DBG(probe, DEBUG, "%s: DMA RX/TX processes started...\n", dev->name); | 1023 | DBG(probe, DEBUG, "%s: DMA RX/TX processes started...\n", dev->name); |