Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/mii mii(4): Sprinkle assertions in mii phy auto time...



details:   https://anonhg.NetBSD.org/src/rev/ef404de8dbae
branches:  trunk
changeset: 368966:ef404de8dbae
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Aug 14 20:33:57 2022 +0000

description:
mii(4): Sprinkle assertions in mii phy auto timeout.

diffstat:

 sys/dev/mii/mii_physubr.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r d60aff0d4ace -r ef404de8dbae sys/dev/mii/mii_physubr.c
--- a/sys/dev/mii/mii_physubr.c Sun Aug 14 20:19:27 2022 +0000
+++ b/sys/dev/mii/mii_physubr.c Sun Aug 14 20:33:57 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mii_physubr.c,v 1.97 2021/12/28 12:00:48 riastradh Exp $       */
+/*     $NetBSD: mii_physubr.c,v 1.98 2022/08/14 20:33:57 riastradh Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.97 2021/12/28 12:00:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.98 2022/08/14 20:33:57 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -308,6 +308,8 @@
 mii_phy_auto_timeout_locked(struct mii_softc *sc)
 {
 
+       KASSERT(mii_locked(sc->mii_pdata));
+
        if (!device_is_active(sc->mii_dev))
                return;
 
@@ -322,6 +324,8 @@
 {
        struct mii_softc *sc = arg;
 
+       KASSERT((sc->mii_flags & MIIF_AUTOTSLEEP) == 0);
+
        if (!device_is_active(sc->mii_dev))
                return;
 



Home | Main Index | Thread Index | Old Index