Wed Mar 9 08:00:22 2016 UTC ()
More debug


(skrll)
diff -r1.254.2.56 -r1.254.2.57 src/sys/dev/usb/ohci.c

cvs diff -r1.254.2.56 -r1.254.2.57 src/sys/dev/usb/ohci.c (expand / switch to unified diff)

--- src/sys/dev/usb/ohci.c 2016/03/08 21:40:22 1.254.2.56
+++ src/sys/dev/usb/ohci.c 2016/03/09 08:00:22 1.254.2.57
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ohci.c,v 1.254.2.56 2016/03/08 21:40:22 skrll Exp $ */ 1/* $NetBSD: ohci.c,v 1.254.2.57 2016/03/09 08:00:22 skrll Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc. 4 * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Lennart Augustsson (lennart@augustsson.net) at 8 * by Lennart Augustsson (lennart@augustsson.net) at
9 * Carlstedt Research & Technology, Jared D. McNeill (jmcneill@invisible.ca) 9 * Carlstedt Research & Technology, Jared D. McNeill (jmcneill@invisible.ca)
10 * and Matthew R. Green (mrg@eterna.com.au). 10 * and Matthew R. Green (mrg@eterna.com.au).
11 * This code is derived from software contributed to The NetBSD Foundation 11 * This code is derived from software contributed to The NetBSD Foundation
12 * by Charles M. Hannum. 12 * by Charles M. Hannum.
13 * 13 *
14 * Redistribution and use in source and binary forms, with or without 14 * Redistribution and use in source and binary forms, with or without
@@ -31,27 +31,27 @@ @@ -31,27 +31,27 @@
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE. 33 * POSSIBILITY OF SUCH DAMAGE.
34 */ 34 */
35 35
36/* 36/*
37 * USB Open Host Controller driver. 37 * USB Open Host Controller driver.
38 * 38 *
39 * OHCI spec: http://www.compaq.com/productinfo/development/openhci.html 39 * OHCI spec: http://www.compaq.com/productinfo/development/openhci.html
40 * USB spec: http://www.usb.org/developers/docs/ 40 * USB spec: http://www.usb.org/developers/docs/
41 */ 41 */
42 42
43#include <sys/cdefs.h> 43#include <sys/cdefs.h>
44__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.56 2016/03/08 21:40:22 skrll Exp $"); 44__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.57 2016/03/09 08:00:22 skrll Exp $");
45 45
46#include "opt_usb.h" 46#include "opt_usb.h"
47 47
48#include <sys/param.h> 48#include <sys/param.h>
49 49
50#include <sys/cpu.h> 50#include <sys/cpu.h>
51#include <sys/device.h> 51#include <sys/device.h>
52#include <sys/kernel.h> 52#include <sys/kernel.h>
53#include <sys/kmem.h> 53#include <sys/kmem.h>
54#include <sys/proc.h> 54#include <sys/proc.h>
55#include <sys/queue.h> 55#include <sys/queue.h>
56#include <sys/select.h> 56#include <sys/select.h>
57#include <sys/sysctl.h> 57#include <sys/sysctl.h>
@@ -1473,26 +1473,27 @@ ohci_softintr(void *v) @@ -1473,26 +1473,27 @@ ohci_softintr(void *v)
1473 DPRINTFN(10, "add TD %p", std, 0, 0, 0); 1473 DPRINTFN(10, "add TD %p", std, 0, 0, 0);
1474 continue; 1474 continue;
1475 } 1475 }
1476 sitd = ohci_hash_find_itd(sc, done); 1476 sitd = ohci_hash_find_itd(sc, done);
1477 if (sitd != NULL) { 1477 if (sitd != NULL) {
1478 usb_syncmem(&sitd->dma, sitd->offs, sizeof(sitd->itd), 1478 usb_syncmem(&sitd->dma, sitd->offs, sizeof(sitd->itd),
1479 BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); 1479 BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
1480 sitd->dnext = sidone; 1480 sitd->dnext = sidone;
1481 done = O32TOH(sitd->itd.itd_nextitd); 1481 done = O32TOH(sitd->itd.itd_nextitd);
1482 sidone = sitd; 1482 sidone = sitd;
1483 DPRINTFN(5, "add ITD %p", sitd, 0, 0, 0); 1483 DPRINTFN(5, "add ITD %p", sitd, 0, 0, 0);
1484 continue; 1484 continue;
1485 } 1485 }
 1486 DPRINTFN(10, "addr %p not found", done, 0, 0, 0);
1486 device_printf(sc->sc_dev, "WARNING: addr 0x%08lx not found\n", 1487 device_printf(sc->sc_dev, "WARNING: addr 0x%08lx not found\n",
1487 (u_long)done); 1488 (u_long)done);
1488 break; 1489 break;
1489 } 1490 }
1490 1491
1491 DPRINTFN(10, "sdone=%p sidone=%p", sdone, sidone, 0, 0); 1492 DPRINTFN(10, "sdone=%p sidone=%p", sdone, sidone, 0, 0);
1492 DPRINTFN(10, "--- TD dump start ---", 0, 0, 0, 0); 1493 DPRINTFN(10, "--- TD dump start ---", 0, 0, 0, 0);
1493#ifdef OHCI_DEBUG 1494#ifdef OHCI_DEBUG
1494 if (ohcidebug >= 10) { 1495 if (ohcidebug >= 10) {
1495 for (std = sdone; std; std = std->dnext) 1496 for (std = sdone; std; std = std->dnext)
1496 ohci_dump_td(sc, std); 1497 ohci_dump_td(sc, std);
1497 } 1498 }
1498#endif 1499#endif