Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb pull down from usbmp branch:



details:   https://anonhg.NetBSD.org/src/rev/484159c05476
branches:  trunk
changeset: 777841:484159c05476
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Mar 06 02:36:45 2012 +0000

description:
pull down from usbmp branch:

- remove SPLUSBCHECK.  it has been broken and disabled for ages.

diffstat:

 sys/dev/usb/ehci.c     |   6 ++----
 sys/dev/usb/ohci.c     |  13 ++-----------
 sys/dev/usb/uhci.c     |  16 ++--------------
 sys/dev/usb/usbdi.c    |  10 ++--------
 sys/dev/usb/usbdivar.h |  16 +---------------
 5 files changed, 9 insertions(+), 52 deletions(-)

diffs (247 lines):

diff -r 8697103c552a -r 484159c05476 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Mon Mar 05 20:13:36 2012 +0000
+++ b/sys/dev/usb/ehci.c        Tue Mar 06 02:36:45 2012 +0000
@@ -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 @@
 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_soft_qh_t *p;
 
-       SPLUSBCHECK;
        /* XXX */
        for (p = head; p != NULL && p->next != sqh; p = p->next)
                ;
diff -r 8697103c552a -r 484159c05476 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Mon Mar 05 20:13:36 2012 +0000
+++ b/sys/dev/usb/ohci.c        Tue Mar 06 02:36:45 2012 +0000
@@ -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 @@
 {
        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_soft_ed_t *p;
 
-       SPLUSBCHECK;
-
        /* XXX */
        for (p = head; p != NULL && p->next != sed; p = p->next)
                ;
@@ -1870,8 +1867,6 @@
 {
        int h = HASH(std->physaddr);
 
-       SPLUSBCHECK;
-
        LIST_INSERT_HEAD(&sc->sc_hash_tds[h], std, hnext);
 }
 
@@ -1879,7 +1874,6 @@
 void
 ohci_hash_rem_td(ohci_softc_t *sc, ohci_soft_td_t *std)
 {
-       SPLUSBCHECK;
 
        LIST_REMOVE(std, hnext);
 }
@@ -1904,8 +1898,6 @@
 {
        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 @@
 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));
diff -r 8697103c552a -r 484159c05476 sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Mon Mar 05 20:13:36 2012 +0000
+++ b/sys/dev/usb/uhci.c        Tue Mar 06 02:36:45 2012 +0000
@@ -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_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_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_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_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_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_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() */
diff -r 8697103c552a -r 484159c05476 sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c       Mon Mar 05 20:13:36 2012 +0000
+++ b/sys/dev/usb/usbdi.c       Tue Mar 06 02:36:45 2012 +0000
@@ -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_xfer_handle xfer;
 
-       SPLUSBCHECK;
-
        DPRINTFN(2,("usbd_ar_pipe: pipe=%p\n", pipe));
 #ifdef USB_DEBUG
        if (usbdebug > 5)
@@ -752,8 +750,6 @@
            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_xfer_handle xfer;
        usbd_status err;
 
-       SPLUSBCHECK;
-
 #ifdef DIAGNOSTIC
        if (pipe == NULL) {
                printf("usbd_start_next: pipe == NULL\n");
diff -r 8697103c552a -r 484159c05476 sys/dev/usb/usbdivar.h
--- a/sys/dev/usb/usbdivar.h    Mon Mar 05 20:13:36 2012 +0000
+++ b/sys/dev/usb/usbdivar.h    Tue Mar 06 02:36:45 2012 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index