Module Name: src
Committed By: mrg
Date: Tue Mar 6 02:36:47 UTC 2012
Modified Files:
src/sys/dev/usb: ehci.c ohci.c uhci.c usbdi.c usbdivar.h
Log Message:
pull down from usbmp branch:
- remove SPLUSBCHECK. it has been broken and disabled for ages.
To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.218 -r1.219 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.242 -r1.243 src/sys/dev/usb/uhci.c
cvs rdiff -u -r1.134 -r1.135 src/sys/dev/usb/usbdi.c
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/usb/usbdivar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.183 src/sys/dev/usb/ehci.c:1.184
--- src/sys/dev/usb/ehci.c:1.183 Fri Dec 23 00:51:43 2011
+++ src/sys/dev/usb/ehci.c Tue Mar 6 02:36:45 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.183 2011/12/23 00:51:43 jakllsch Exp $ */
+/* $NetBSD: ehci.c,v 1.184 2012/03/06 02:36:45 mrg Exp $ */
/*
* Copyright (c) 2004-2008 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.183 2011/12/23 00:51:43 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.184 2012/03/06 02:36:45 mrg Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -1730,7 +1730,6 @@ ehci_open(usbd_pipe_handle pipe)
Static void
ehci_add_qh(ehci_soft_qh_t *sqh, ehci_soft_qh_t *head)
{
- SPLUSBCHECK;
usb_syncmem(&head->dma, head->offs + offsetof(ehci_qh_t, qh_link),
sizeof(head->qh.qh_link), BUS_DMASYNC_POSTWRITE);
@@ -1759,7 +1758,6 @@ ehci_rem_qh(ehci_softc_t *sc, ehci_soft_
{
ehci_soft_qh_t *p;
- SPLUSBCHECK;
/* XXX */
for (p = head; p != NULL && p->next != sqh; p = p->next)
;
Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.218 src/sys/dev/usb/ohci.c:1.219
--- src/sys/dev/usb/ohci.c:1.218 Sun Aug 7 13:45:46 2011
+++ src/sys/dev/usb/ohci.c Tue Mar 6 02:36:46 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.218 2011/08/07 13:45:46 jmcneill Exp $ */
+/* $NetBSD: ohci.c,v 1.219 2012/03/06 02:36:46 mrg Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
/*
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.218 2011/08/07 13:45:46 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.219 2012/03/06 02:36:46 mrg Exp $");
#include "opt_usb.h"
@@ -1812,7 +1812,6 @@ ohci_add_ed(ohci_softc_t *sc, ohci_soft_
{
DPRINTFN(8,("ohci_add_ed: sed=%p head=%p\n", sed, head));
- SPLUSBCHECK;
usb_syncmem(&head->dma, head->offs + offsetof(ohci_ed_t, ed_nexted),
sizeof(head->ed.ed_nexted),
BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
@@ -1836,8 +1835,6 @@ ohci_rem_ed(ohci_soft_ed_t *sed, ohci_so
{
ohci_soft_ed_t *p;
- SPLUSBCHECK;
-
/* XXX */
for (p = head; p != NULL && p->next != sed; p = p->next)
;
@@ -1870,8 +1867,6 @@ ohci_hash_add_td(ohci_softc_t *sc, ohci_
{
int h = HASH(std->physaddr);
- SPLUSBCHECK;
-
LIST_INSERT_HEAD(&sc->sc_hash_tds[h], std, hnext);
}
@@ -1879,7 +1874,6 @@ ohci_hash_add_td(ohci_softc_t *sc, ohci_
void
ohci_hash_rem_td(ohci_softc_t *sc, ohci_soft_td_t *std)
{
- SPLUSBCHECK;
LIST_REMOVE(std, hnext);
}
@@ -1904,8 +1898,6 @@ ohci_hash_add_itd(ohci_softc_t *sc, ohci
{
int h = HASH(sitd->physaddr);
- SPLUSBCHECK;
-
DPRINTFN(10,("ohci_hash_add_itd: sitd=%p physaddr=0x%08lx\n",
sitd, (u_long)sitd->physaddr));
@@ -1916,7 +1908,6 @@ ohci_hash_add_itd(ohci_softc_t *sc, ohci
void
ohci_hash_rem_itd(ohci_softc_t *sc, ohci_soft_itd_t *sitd)
{
- SPLUSBCHECK;
DPRINTFN(10,("ohci_hash_rem_itd: sitd=%p physaddr=0x%08lx\n",
sitd, (u_long)sitd->physaddr));
Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.242 src/sys/dev/usb/uhci.c:1.243
--- src/sys/dev/usb/uhci.c:1.242 Fri Dec 23 00:51:46 2011
+++ src/sys/dev/usb/uhci.c Tue Mar 6 02:36:46 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.242 2011/12/23 00:51:46 jakllsch Exp $ */
+/* $NetBSD: uhci.c,v 1.243 2012/03/06 02:36:46 mrg Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
/*
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.242 2011/12/23 00:51:46 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.243 2012/03/06 02:36:46 mrg Exp $");
#include "opt_usb.h"
@@ -1076,8 +1076,6 @@ uhci_add_hs_ctrl(uhci_softc_t *sc, uhci_
{
uhci_soft_qh_t *eqh;
- SPLUSBCHECK;
-
DPRINTFN(10, ("uhci_add_ctrl: sqh=%p\n", sqh));
eqh = sc->sc_hctl_end;
usb_syncmem(&eqh->dma, eqh->offs + offsetof(uhci_qh_t, qh_hlink),
@@ -1103,8 +1101,6 @@ uhci_remove_hs_ctrl(uhci_softc_t *sc, uh
{
uhci_soft_qh_t *pqh;
- SPLUSBCHECK;
-
DPRINTFN(10, ("uhci_remove_hs_ctrl: sqh=%p\n", sqh));
#ifdef UHCI_CTL_LOOP
uhci_rem_loop(sc);
@@ -1153,8 +1149,6 @@ uhci_add_ls_ctrl(uhci_softc_t *sc, uhci_
{
uhci_soft_qh_t *eqh;
- SPLUSBCHECK;
-
DPRINTFN(10, ("uhci_add_ls_ctrl: sqh=%p\n", sqh));
eqh = sc->sc_lctl_end;
usb_syncmem(&eqh->dma, eqh->offs + offsetof(uhci_qh_t, qh_hlink),
@@ -1176,8 +1170,6 @@ uhci_remove_ls_ctrl(uhci_softc_t *sc, uh
{
uhci_soft_qh_t *pqh;
- SPLUSBCHECK;
-
DPRINTFN(10, ("uhci_remove_ls_ctrl: sqh=%p\n", sqh));
/* See comment in uhci_remove_hs_ctrl() */
usb_syncmem(&sqh->dma, sqh->offs + offsetof(uhci_qh_t, qh_elink),
@@ -1210,8 +1202,6 @@ uhci_add_bulk(uhci_softc_t *sc, uhci_sof
{
uhci_soft_qh_t *eqh;
- SPLUSBCHECK;
-
DPRINTFN(10, ("uhci_add_bulk: sqh=%p\n", sqh));
eqh = sc->sc_bulk_end;
usb_syncmem(&eqh->dma, eqh->offs + offsetof(uhci_qh_t, qh_hlink),
@@ -1234,8 +1224,6 @@ uhci_remove_bulk(uhci_softc_t *sc, uhci_
{
uhci_soft_qh_t *pqh;
- SPLUSBCHECK;
-
DPRINTFN(10, ("uhci_remove_bulk: sqh=%p\n", sqh));
uhci_rem_loop(sc);
/* See comment in uhci_remove_hs_ctrl() */
Index: src/sys/dev/usb/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.134 src/sys/dev/usb/usbdi.c:1.135
--- src/sys/dev/usb/usbdi.c:1.134 Sun Nov 27 03:25:00 2011
+++ src/sys/dev/usb/usbdi.c Tue Mar 6 02:36:46 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.c,v 1.134 2011/11/27 03:25:00 jmcneill Exp $ */
+/* $NetBSD: usbdi.c,v 1.135 2012/03/06 02:36:46 mrg Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.134 2011/11/27 03:25:00 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.135 2012/03/06 02:36:46 mrg Exp $");
#include "opt_compat_netbsd.h"
#include "opt_usb.h"
@@ -721,8 +721,6 @@ usbd_ar_pipe(usbd_pipe_handle pipe)
{
usbd_xfer_handle xfer;
- SPLUSBCHECK;
-
DPRINTFN(2,("usbd_ar_pipe: pipe=%p\n", pipe));
#ifdef USB_DEBUG
if (usbdebug > 5)
@@ -752,8 +750,6 @@ usb_transfer_complete(usbd_xfer_handle x
xfer->status == USBD_TIMEOUT;
int repeat, polling;
- SPLUSBCHECK;
-
DPRINTFN(5, ("usb_transfer_complete: pipe=%p xfer=%p status=%d "
"actlen=%d\n", pipe, xfer, xfer->status, xfer->actlen));
@@ -885,8 +881,6 @@ usbd_start_next(usbd_pipe_handle pipe)
usbd_xfer_handle xfer;
usbd_status err;
- SPLUSBCHECK;
-
#ifdef DIAGNOSTIC
if (pipe == NULL) {
printf("usbd_start_next: pipe == NULL\n");
Index: src/sys/dev/usb/usbdivar.h
diff -u src/sys/dev/usb/usbdivar.h:1.93 src/sys/dev/usb/usbdivar.h:1.94
--- src/sys/dev/usb/usbdivar.h:1.93 Fri May 27 17:19:18 2011
+++ src/sys/dev/usb/usbdivar.h Tue Mar 6 02:36:46 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdivar.h,v 1.93 2011/05/27 17:19:18 drochner Exp $ */
+/* $NetBSD: usbdivar.h,v 1.94 2012/03/06 02:36:46 mrg Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdivar.h,v 1.11 1999/11/17 22:33:51 n_hibma Exp $ */
/*
@@ -258,17 +258,3 @@ int usb_disconnect_port(struct usbd_por
void usb_needs_explore(usbd_device_handle);
void usb_needs_reattach(usbd_device_handle);
void usb_schedsoftintr(struct usbd_bus *);
-
-/*
- * XXX This check is extremely bogus. Bad Bad Bad.
- */
-#if defined(DIAGNOSTIC) && 0
-#define SPLUSBCHECK \
- do { int _s = splusb(), _su = splusb(); \
- if (!cold && _s != _su) printf("SPLUSBCHECK failed 0x%x!=0x%x, %s:%d\n", \
- _s, _su, __FILE__, __LINE__); \
- splx(_s); \
- } while (0)
-#else
-#define SPLUSBCHECK
-#endif