]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
stmmac: fix timer setup when use dual mac Kconfig
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Tue, 27 Jul 2010 00:09:46 +0000 (00:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Jul 2010 03:43:50 +0000 (20:43 -0700)
The driver erroneously sets the tmrate to zero when the
TMU initialisation fails. This actually generates problems
while using the dual GMAC configuration.

With this patch, enabling both the dual gmac and the timer
optimisation, the first interface opened will use the tmu
channel 2, the second one won't be able to use the timer but
will continue to work without mitigating the interrupts by
using the external timer (i.e. TMU channel 2).

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/stmmac/stmmac_main.c

index 0bdd3326c94a5fbf06848c0827288fe88bd7e57a..1083334ccd217f768116617302502e5e8c3793cd 100644 (file)
@@ -829,7 +829,6 @@ static int stmmac_open(struct net_device *dev)
         * In case of failure continue without timer. */
        if (unlikely((stmmac_open_ext_timer(dev, priv->tm)) < 0)) {
                pr_warning("stmmaceth: cannot attach the external timer.\n");
-               tmrate = 0;
                priv->tm->freq = 0;
                priv->tm->timer_start = stmmac_no_timer_started;
                priv->tm->timer_stop = stmmac_no_timer_stopped;