Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys Use SOFTINT_SERIAL for the USB stack (the 'S' stand...
details: https://anonhg.NetBSD.org/src/rev/5140f0373991
branches: nick-nhusb
changeset: 334519:5140f0373991
user: skrll <skrll%NetBSD.org@localhost>
date: Fri Jun 10 08:15:21 2016 +0000
description:
Use SOFTINT_SERIAL for the USB stack (the 'S' stands for serial).
This is a step in the right direction towards fixing
kern/50491: unkillable wait in usbd_transfer while using usmsc0 on
raspberry pi 2
kern/49065: ifconfig tun0 ... sequence locks up system
but further analysis of locking of the usb drivers is required.
diffstat:
sys/dev/usb/ehci.c | 8 ++++----
sys/dev/usb/ohci.c | 6 +++---
sys/dev/usb/usb.c | 6 +++---
sys/dev/usb/usbdi.h | 11 ++++++-----
sys/external/bsd/dwc2/dwc2.c | 6 +++---
5 files changed, 19 insertions(+), 18 deletions(-)
diffs (137 lines):
diff -r bb3a709908a4 -r 5140f0373991 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c Thu Jun 09 05:06:20 2016 +0000
+++ b/sys/dev/usb/ehci.c Fri Jun 10 08:15:21 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.234.2.102 2016/05/29 08:44:31 skrll Exp $ */
+/* $NetBSD: ehci.c,v 1.234.2.103 2016/06/10 08:15:21 skrll Exp $ */
/*
* Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.102 2016/05/29 08:44:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.103 2016/06/10 08:15:21 skrll Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -418,10 +418,10 @@
sc->sc_xferpool = pool_cache_init(sizeof(struct ehci_xfer), 0, 0, 0,
"ehcixfer", NULL, IPL_USB, NULL, NULL, NULL);
- sc->sc_doorbell_si = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
+ sc->sc_doorbell_si = softint_establish(SOFTINT_USB | SOFTINT_MPSAFE,
ehci_doorbell, sc);
KASSERT(sc->sc_doorbell_si != NULL);
- sc->sc_pcd_si = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
+ sc->sc_pcd_si = softint_establish(SOFTINT_USB | SOFTINT_MPSAFE,
ehci_pcd, sc);
KASSERT(sc->sc_pcd_si != NULL);
diff -r bb3a709908a4 -r 5140f0373991 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c Thu Jun 09 05:06:20 2016 +0000
+++ b/sys/dev/usb/ohci.c Fri Jun 10 08:15:21 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.254.2.76 2016/05/30 06:46:50 skrll Exp $ */
+/* $NetBSD: ohci.c,v 1.254.2.77 2016/06/10 08:15:21 skrll Exp $ */
/*
* Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.76 2016/05/30 06:46:50 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.77 2016/06/10 08:15:21 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -790,7 +790,7 @@
mutex_init(&sc->sc_intr_lock, MUTEX_DEFAULT, IPL_USB);
cv_init(&sc->sc_softwake_cv, "ohciab");
- sc->sc_rhsc_si = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
+ sc->sc_rhsc_si = softint_establish(SOFTINT_USB | SOFTINT_MPSAFE,
ohci_rhsc_softint, sc);
for (i = 0; i < OHCI_HASH_SIZE; i++)
diff -r bb3a709908a4 -r 5140f0373991 sys/dev/usb/usb.c
--- a/sys/dev/usb/usb.c Thu Jun 09 05:06:20 2016 +0000
+++ b/sys/dev/usb/usb.c Fri Jun 10 08:15:21 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb.c,v 1.156.2.13 2016/05/29 08:44:31 skrll Exp $ */
+/* $NetBSD: usb.c,v 1.156.2.14 2016/06/10 08:15:22 skrll Exp $ */
/*
* Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.156.2.13 2016/05/29 08:44:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.156.2.14 2016/06/10 08:15:22 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -254,7 +254,7 @@
aprint_normal("\n");
/* XXX we should have our own level */
- sc->sc_bus->ub_soft = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
+ sc->sc_bus->ub_soft = softint_establish(SOFTINT_USB | SOFTINT_MPSAFE,
usb_soft_intr, sc->sc_bus);
if (sc->sc_bus->ub_soft == NULL) {
aprint_error("%s: can't register softintr\n",
diff -r bb3a709908a4 -r 5140f0373991 sys/dev/usb/usbdi.h
--- a/sys/dev/usb/usbdi.h Thu Jun 09 05:06:20 2016 +0000
+++ b/sys/dev/usb/usbdi.h Fri Jun 10 08:15:21 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.h,v 1.90.4.12 2016/03/25 08:34:16 skrll Exp $ */
+/* $NetBSD: usbdi.h,v 1.90.4.13 2016/06/10 08:15:22 skrll Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */
/*
@@ -295,10 +295,11 @@
*
* Eventually, IPL_USB can/should be changed
*/
-#define splusb splsoftnet
+#define IPL_USB IPL_VM
#define splhardusb splvm
-#define IPL_SOFTUSB IPL_SOFTNET
-#define IPL_USB IPL_VM
-#define SOFTINT_USB SOFTINT_NET
+
+#define SOFTINT_USB SOFTINT_SERIAL
+#define IPL_SOFTUSB IPL_SOFTSERIAL
+#define splusb splsoftserial
#endif /* _USBDI_H_ */
diff -r bb3a709908a4 -r 5140f0373991 sys/external/bsd/dwc2/dwc2.c
--- a/sys/external/bsd/dwc2/dwc2.c Thu Jun 09 05:06:20 2016 +0000
+++ b/sys/external/bsd/dwc2/dwc2.c Fri Jun 10 08:15:21 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2.c,v 1.32.2.27 2016/05/29 08:44:36 skrll Exp $ */
+/* $NetBSD: dwc2.c,v 1.32.2.28 2016/06/10 08:15:22 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.32.2.27 2016/05/29 08:44:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32.2.28 2016/06/10 08:15:22 skrll Exp $");
#include "opt_usb.h"
@@ -1264,7 +1264,7 @@
TAILQ_INIT(&sc->sc_complete);
- sc->sc_rhc_si = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
+ sc->sc_rhc_si = softint_establish(SOFTINT_USB | SOFTINT_MPSAFE,
dwc2_rhc, sc);
sc->sc_xferpool = pool_cache_init(sizeof(struct dwc2_xfer), 0, 0, 0,
Home |
Main Index |
Thread Index |
Old Index