Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Add a KASSERT
details: https://anonhg.NetBSD.org/src/rev/99d28eb9eee4
branches: trunk
changeset: 996170:99d28eb9eee4
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Jan 22 06:42:33 2019 +0000
description:
Add a KASSERT
diffstat:
sys/dev/usb/uhci.c | 5 +++--
sys/dev/usb/xhci.c | 5 +++--
sys/external/bsd/dwc2/dwc2.c | 5 +++--
3 files changed, 9 insertions(+), 6 deletions(-)
diffs (78 lines):
diff -r 7a85ea42882c -r 99d28eb9eee4 sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c Tue Jan 22 06:40:49 2019 +0000
+++ b/sys/dev/usb/uhci.c Tue Jan 22 06:42:33 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.284 2018/09/16 20:21:56 mrg Exp $ */
+/* $NetBSD: uhci.c,v 1.285 2019/01/22 06:42:33 skrll Exp $ */
/*
* Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.284 2018/09/16 20:21:56 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.285 2019/01/22 06:42:33 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1740,6 +1740,7 @@
DPRINTF("xfer=%#jx", (uintptr_t)xfer, 0, 0, 0);
mutex_enter(&sc->sc_lock);
+ KASSERT(xfer->ux_status == USBD_TIMEOUT);
uhci_abort_xfer(xfer, USBD_TIMEOUT);
mutex_exit(&sc->sc_lock);
}
diff -r 7a85ea42882c -r 99d28eb9eee4 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c Tue Jan 22 06:40:49 2019 +0000
+++ b/sys/dev/usb/xhci.c Tue Jan 22 06:42:33 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci.c,v 1.103 2019/01/11 15:43:51 skrll Exp $ */
+/* $NetBSD: xhci.c,v 1.104 2019/01/22 06:42:33 skrll Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.103 2019/01/11 15:43:51 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.104 2019/01/22 06:42:33 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -4180,6 +4180,7 @@
struct xhci_softc * const sc = XHCI_XFER2SC(xfer);
mutex_enter(&sc->sc_lock);
+ KASSERT(xfer->ux_status == USBD_TIMEOUT);
xhci_abort_xfer(xfer, USBD_TIMEOUT);
mutex_exit(&sc->sc_lock);
}
diff -r 7a85ea42882c -r 99d28eb9eee4 sys/external/bsd/dwc2/dwc2.c
--- a/sys/external/bsd/dwc2/dwc2.c Tue Jan 22 06:40:49 2019 +0000
+++ b/sys/external/bsd/dwc2/dwc2.c Tue Jan 22 06:42:33 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2.c,v 1.55 2018/09/16 20:21:56 mrg Exp $ */
+/* $NetBSD: dwc2.c,v 1.56 2019/01/22 06:42:33 skrll Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.55 2018/09/16 20:21:56 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.56 2019/01/22 06:42:33 skrll Exp $");
#include "opt_usb.h"
@@ -341,6 +341,7 @@
DPRINTF("xfer=%p\n", xfer);
mutex_enter(&sc->sc_lock);
+ KASSERT(xfer->ux_status == USBD_TIMEOUT);
dwc2_abort_xfer(xfer, USBD_TIMEOUT);
mutex_exit(&sc->sc_lock);
}
Home |
Main Index |
Thread Index |
Old Index