Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb When there is no network around the state timeou...
details: https://anonhg.NetBSD.org/src/rev/4e9373681683
branches: trunk
changeset: 1008321:4e9373681683
user: khorben <khorben%NetBSD.org@localhost>
date: Thu Mar 19 07:49:29 2020 +0000
description:
When there is no network around the state timeout fires over and over again.
Change the printf into a log and only under IFF_DEBUG to reduce dmesg spam.
Loudly requested by beck@ OK deraadt@
>From OpenBSD.
diffstat:
sys/dev/usb/if_umb.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 873ac5342f1c -r 4e9373681683 sys/dev/usb/if_umb.c
--- a/sys/dev/usb/if_umb.c Thu Mar 19 07:20:36 2020 +0000
+++ b/sys/dev/usb/if_umb.c Thu Mar 19 07:49:29 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_umb.c,v 1.14 2020/03/14 02:35:33 christos Exp $ */
+/* $NetBSD: if_umb.c,v 1.15 2020/03/19 07:49:29 khorben Exp $ */
/* $OpenBSD: if_umb.c,v 1.20 2018/09/10 17:00:45 gerhard Exp $ */
/*
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.14 2020/03/14 02:35:33 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.15 2020/03/19 07:49:29 khorben Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -948,9 +948,12 @@
umb_statechg_timeout(void *arg)
{
struct umb_softc *sc = arg;
+ struct ifnet *ifp = GET_IFP(sc);
if (sc->sc_info.regstate != MBIM_REGSTATE_ROAMING || sc->sc_roaming)
- printf("%s: state change timeout\n",DEVNAM(sc));
+ if (ifp->if_flags & IFF_DEBUG)
+ log(LOG_DEBUG, "%s: state change timeout\n",
+ DEVNAM(sc));
usb_add_task(sc->sc_udev, &sc->sc_umb_task, USB_TASKQ_DRIVER);
}
Home |
Main Index |
Thread Index |
Old Index