Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb More debug.
details: https://anonhg.NetBSD.org/src/rev/7af7797be0e9
branches: trunk
changeset: 807314:7af7797be0e9
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Apr 05 09:12:06 2015 +0000
description:
More debug.
diffstat:
sys/dev/usb/usb_subr.c | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diffs (63 lines):
diff -r d871b00fbd6f -r 7af7797be0e9 sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c Sun Apr 05 08:41:05 2015 +0000
+++ b/sys/dev/usb/usb_subr.c Sun Apr 05 09:12:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_subr.c,v 1.199 2015/03/27 07:28:56 skrll Exp $ */
+/* $NetBSD: usb_subr.c,v 1.200 2015/04/05 09:12:06 skrll Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.199 2015/03/27 07:28:56 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.200 2015/04/05 09:12:06 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -847,9 +847,12 @@
ifaces = malloc(nifaces * sizeof(*ifaces), M_USB, M_NOWAIT|M_ZERO);
if (!ifaces)
return (USBD_NOMEM);
- for (i = 0; i < nifaces; i++)
- if (!dev->subdevs[i])
+ for (i = 0; i < nifaces; i++) {
+ if (!dev->subdevs[i]) {
ifaces[i] = &dev->ifaces[i];
+ }
+ DPRINTF(("%s: interface %d %p\n", __func__, i, ifaces[i]));
+ }
uiaa.device = dev;
uiaa.port = port;
@@ -866,13 +869,19 @@
ilocs[USBIFIFCF_CONFIGURATION] = uiaa.configno;
for (i = 0; i < nifaces; i++) {
- if (!ifaces[i])
+ if (!ifaces[i]) {
+ DPRINTF(("%s: interface %d claimed\n", __func__, i));
continue; /* interface already claimed */
+ }
uiaa.iface = ifaces[i];
uiaa.class = ifaces[i]->idesc->bInterfaceClass;
uiaa.subclass = ifaces[i]->idesc->bInterfaceSubClass;
uiaa.proto = ifaces[i]->idesc->bInterfaceProtocol;
uiaa.ifaceno = ifaces[i]->idesc->bInterfaceNumber;
+
+ DPRINTF(("%s: searching for interface %d "
+ "class %x subclass %x proto %x ifaceno %d\n", __func__, i,
+ uiaa.class, uiaa.subclass, uiaa.proto, uiaa.ifaceno));
ilocs[USBIFIFCF_INTERFACE] = uiaa.ifaceno;
if (locators != NULL) {
loc = locators[USBIFIFCF_CONFIGURATION];
@@ -891,6 +900,8 @@
/* account for ifaces claimed by the driver behind our back */
for (j = 0; j < nifaces; j++) {
if (!ifaces[j] && !dev->subdevs[j]) {
+ DPRINTF(("%s: interface %d claimed "
+ "behind our back", __func__, j));
dev->subdevs[j] = dv;
dev->nifaces_claimed++;
}
Home |
Main Index |
Thread Index |
Old Index