Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci don't give up on mii tick before the interface i...



details:   https://anonhg.NetBSD.org/src/rev/52bd7cd3003e
branches:  trunk
changeset: 334836:52bd7cd3003e
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Dec 10 00:15:26 2014 +0000

description:
don't give up on mii tick before the interface is marked up.

diffstat:

 sys/dev/pci/if_sk.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r a1dbd66adf30 -r 52bd7cd3003e sys/dev/pci/if_sk.c
--- a/sys/dev/pci/if_sk.c       Tue Dec 09 20:25:43 2014 +0000
+++ b/sys/dev/pci/if_sk.c       Wed Dec 10 00:15:26 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_sk.c,v 1.78 2014/08/10 16:44:36 tls Exp $   */
+/*     $NetBSD: if_sk.c,v 1.79 2014/12/10 00:15:26 christos Exp $      */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -115,7 +115,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.78 2014/08/10 16:44:36 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.79 2014/12/10 00:15:26 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -2220,7 +2220,10 @@
        SK_XM_CLRBIT_2(sc_if, XM_IMR, XM_IMR_GP0_SET);
        SK_XM_READ_2(sc_if, XM_ISR);
        mii_tick(mii);
-       callout_stop(&sc_if->sk_tick_ch);
+       if (ifp->if_link_state != LINK_STATE_UP)
+               callout_reset(&sc_if->sk_tick_ch, hz, sk_tick, sc_if);
+       else
+               callout_stop(&sc_if->sk_tick_ch);
 }
 
 void
@@ -2872,6 +2875,7 @@
 
        ifp->if_flags |= IFF_RUNNING;
        ifp->if_flags &= ~IFF_OACTIVE;
+       callout_reset(&sc_if->sk_tick_ch, hz, sk_tick, sc_if);
 
 out:
        splx(s);



Home | Main Index | Thread Index | Old Index