Module Name: src
Committed By: skrll
Date: Sun Mar 1 08:10:12 UTC 2015
Modified Files:
src/sys/dev/usb [nick-nhusb]: usb_subr.c
Log Message:
Convert to USBHIST
To generate a diff of this commit:
cvs rdiff -u -r1.198.2.5 -r1.198.2.6 src/sys/dev/usb/usb_subr.c
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/usb_subr.c
diff -u src/sys/dev/usb/usb_subr.c:1.198.2.5 src/sys/dev/usb/usb_subr.c:1.198.2.6
--- src/sys/dev/usb/usb_subr.c:1.198.2.5 Fri Dec 5 09:37:50 2014
+++ src/sys/dev/usb/usb_subr.c Sun Mar 1 08:10:12 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_subr.c,v 1.198.2.5 2014/12/05 09:37:50 skrll Exp $ */
+/* $NetBSD: usb_subr.c,v 1.198.2.6 2015/03/01 08:10:12 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.198.2.5 2014/12/05 09:37:50 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.198.2.6 2015/03/01 08:10:12 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -59,17 +59,12 @@ __KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v
#include <dev/usb/usbdevs.h>
#include <dev/usb/usb_quirks.h>
#include <dev/usb/usb_verbose.h>
+#include <dev/usb/usbhist.h>
#include "locators.h"
-#ifdef USB_DEBUG
-#define DPRINTF(x) if (usbdebug) printf x
-#define DPRINTFN(n,x) if (usbdebug>(n)) printf x
-extern int usbdebug;
-#else
-#define DPRINTF(x)
-#define DPRINTFN(n,x)
-#endif
+#define DPRINTF(FMT,A,B,C,D) USBHIST_LOG(usbdebug,FMT,A,B,C,D)
+#define DPRINTFN(N,FMT,A,B,C,D) USBHIST_LOGN(usbdebug,N,FMT,A,B,C,D)
Static usbd_status usbd_set_config(usbd_device_handle, int);
Static void usbd_devinfo(usbd_device_handle, int, char *, size_t);
@@ -127,6 +122,8 @@ usbd_get_string_desc(usbd_device_handle
usb_device_request_t req;
usbd_status err;
int actlen;
+
+ USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
req.bmRequestType = UT_READ_DEVICE;
req.bRequest = UR_GET_DESCRIPTOR;
@@ -148,8 +145,7 @@ usbd_get_string_desc(usbd_device_handle
return err;
if (actlen != sdesc->bLength) {
- DPRINTFN(-1, ("usbd_get_string_desc: expected %d, got %d\n",
- sdesc->bLength, actlen));
+ DPRINTF("expected %d, got %d", sdesc->bLength, actlen, 0, 0);
}
*sizep = actlen;
@@ -289,14 +285,15 @@ usbd_reset_port(usbd_device_handle dev,
usbd_status err;
int n;
+ USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
req.bmRequestType = UT_WRITE_CLASS_OTHER;
req.bRequest = UR_SET_FEATURE;
USETW(req.wValue, UHF_PORT_RESET);
USETW(req.wIndex, port);
USETW(req.wLength, 0);
err = usbd_do_request(dev, &req, 0);
- DPRINTFN(1,("usbd_reset_port: port %d reset done, error=%s\n",
- port, usbd_errstr(err)));
+ DPRINTFN(1, "port %d reset done, error=%d", port, err, 0, 0);
if (err)
return err;
n = 10;
@@ -305,8 +302,7 @@ usbd_reset_port(usbd_device_handle dev,
usbd_delay_ms(dev, USB_PORT_RESET_DELAY);
err = usbd_get_port_status(dev, port, ps);
if (err) {
- DPRINTF(("usbd_reset_port: get status failed %d\n",
- err));
+ DPRINTF("get status failed %d", err, 0, 0, 0);
return err;
}
/* If the device disappeared, just give up. */
@@ -318,8 +314,7 @@ usbd_reset_port(usbd_device_handle dev,
err = usbd_clear_port_feature(dev, port, UHF_C_PORT_RESET);
#ifdef USB_DEBUG
if (err)
- DPRINTF(("usbd_reset_port: clear port feature failed %d\n",
- err));
+ DPRINTF("clear port feature failed %d", err, 0, 0, 0);
#endif
/* Wait for the device to recover from reset. */
@@ -335,12 +330,14 @@ usbd_find_idesc(usb_config_descriptor_t
usb_interface_descriptor_t *d;
int curidx, lastidx, curaidx = 0;
+ USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
for (curidx = lastidx = -1; p < end; ) {
d = (usb_interface_descriptor_t *)p;
- DPRINTFN(4,("usbd_find_idesc: idx=%d(%d) altidx=%d(%d) len=%d "
- "type=%d\n",
- ifaceidx, curidx, altidx, curaidx,
- d->bLength, d->bDescriptorType));
+ DPRINTFN(4, "idx=%d(%d) altidx=%d(%d)", ifaceidx, curidx,
+ altidx, curaidx);
+ DPRINTFN(4, "len=%d type=%d", d->bLength, d->bDescriptorType,
+ 0, 0);
if (d->bLength == 0) /* bad descriptor */
break;
p += d->bLength;
@@ -399,8 +396,9 @@ usbd_fill_iface_data(usbd_device_handle
char *p, *end;
int endpt, nendpt;
- DPRINTFN(4,("usbd_fill_iface_data: ifaceidx=%d altidx=%d\n",
- ifaceidx, altidx));
+ USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
+ DPRINTFN(4, "ifaceidx=%d altidx=%d", ifaceidx, altidx, 0, 0);
idesc = usbd_find_idesc(dev->ud_cdesc, ifaceidx, altidx);
if (idesc == NULL)
return USBD_INVAL;
@@ -409,7 +407,7 @@ usbd_fill_iface_data(usbd_device_handle
ifc->ui_index = ifaceidx;
ifc->ui_altindex = altidx;
nendpt = ifc->ui_idesc->bNumEndpoints;
- DPRINTFN(4,("usbd_fill_iface_data: found idesc nendpt=%d\n", nendpt));
+ DPRINTFN(4, "found idesc nendpt=%d", nendpt, 0, 0, 0);
if (nendpt != 0) {
ifc->ui_endpoints = kmem_alloc(nendpt * sizeof(struct usbd_endpoint),
KM_SLEEP);
@@ -422,11 +420,10 @@ usbd_fill_iface_data(usbd_device_handle
end = (char *)dev->ud_cdesc + UGETW(dev->ud_cdesc->wTotalLength);
#define ed ((usb_endpoint_descriptor_t *)p)
for (endpt = 0; endpt < nendpt; endpt++) {
- DPRINTFN(10,("usbd_fill_iface_data: endpt=%d\n", endpt));
+ DPRINTFN(10, "endpt=%d\n", endpt, 0, 0, 0);
for (; p < end; p += ed->bLength) {
- DPRINTFN(10,("usbd_fill_iface_data: p=%p end=%p "
- "len=%d type=%d\n",
- p, end, ed->bLength, ed->bDescriptorType));
+ DPRINTFN(10, "p=%p end=%p len=%d type=%d",
+ p, end, ed->bLength, ed->bDescriptorType);
if (p + ed->bLength <= end && ed->bLength != 0 &&
ed->bDescriptorType == UDESC_ENDPOINT)
goto found;
@@ -511,10 +508,12 @@ usbd_set_config_no(usbd_device_handle de
usb_config_descriptor_t cd;
usbd_status err;
+ USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
if (no == USB_UNCONFIG_NO)
return usbd_set_config_index(dev, USB_UNCONFIG_INDEX, msg);
- DPRINTFN(5,("usbd_set_config_no: %d\n", no));
+ DPRINTFN(5, "%d", no, 0, 0, 0);
/* Figure out what config index to use. */
for (index = 0; index < dev->ud_ddesc.bNumConfigurations; index++) {
err = usbd_get_config_desc(dev, index, &cd);
@@ -533,7 +532,9 @@ usbd_set_config_index(usbd_device_handle
usbd_status err;
int i, ifcidx, nifc, len, selfpowered, power;
- DPRINTFN(5,("usbd_set_config_index: dev=%p index=%d\n", dev, index));
+ USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
+ DPRINTFN(5, "dev=%p index=%d", dev, index, 0, 0);
if (index >= dev->ud_ddesc.bNumConfigurations &&
index != USB_UNCONFIG_INDEX) {
@@ -544,7 +545,7 @@ usbd_set_config_index(usbd_device_handle
/* XXX check that all interfaces are idle */
if (dev->ud_config != USB_UNCONFIG_NO) {
- DPRINTF(("usbd_set_config_index: free old config\n"));
+ DPRINTF("free old config", 0, 0, 0, 0);
/* Free all configuration data structures. */
nifc = dev->ud_cdesc->bNumInterface;
for (ifcidx = 0; ifcidx < nifc; ifcidx++)
@@ -558,11 +559,11 @@ usbd_set_config_index(usbd_device_handle
if (index == USB_UNCONFIG_INDEX) {
/* We are unconfiguring the device, so leave unallocated. */
- DPRINTF(("usbd_set_config_index: set config 0\n"));
+ DPRINTF("set config 0", 0, 0, 0, 0);
err = usbd_set_config(dev, USB_UNCONFIG_NO);
if (err) {
- DPRINTF(("usbd_set_config_index: setting config=0 "
- "failed, error=%s\n", usbd_errstr(err)));
+ DPRINTF("setting config=0 failed, err = %d", err,
+ 0, 0, 0);
}
return err;
}
@@ -570,7 +571,7 @@ usbd_set_config_index(usbd_device_handle
/* Get the short descriptor. */
err = usbd_get_config_desc(dev, index, &cd);
if (err) {
- DPRINTF(("usbd_set_config_index: get_config_desc=%d\n", err));
+ DPRINTF("get_config_desc=%d", err, 0, 0, 0);
return err;
}
len = UGETW(cd.wTotalLength);
@@ -586,12 +587,11 @@ usbd_set_config_index(usbd_device_handle
usbd_delay_ms(dev, 200);
}
if (err) {
- DPRINTF(("usbd_set_config_index: get_desc=%d\n", err));
+ DPRINTF("get_desc=%d", err, 0, 0, 0);
goto bad;
}
if (cdp->bDescriptorType != UDESC_CONFIG) {
- DPRINTFN(-1,("usbd_set_config_index: bad desc %d\n",
- cdp->bDescriptorType));
+ DPRINTF("bad desc %d", cdp->bDescriptorType, 0, 0, 0);
err = USBD_INVAL;
goto bad;
}
@@ -613,10 +613,10 @@ usbd_set_config_index(usbd_device_handle
*/
selfpowered = !!(cdp->bmAttributes & UC_SELF_POWERED);
- DPRINTF(("usbd_set_config_index: (addr %d) cno=%d attr=0x%02x, "
- "selfpowered=%d, power=%d\n",
- cdp->bConfigurationValue, dev->ud_addr, cdp->bmAttributes,
- selfpowered, cdp->bMaxPower * 2));
+ DPRINTF("addr %d cno=%d attr=0x%02x, selfpowered=%d",
+ dev->ud_addr, cdp->bConfigurationValue, cdp->bmAttributes,
+ selfpowered);
+ DPRINTF("max power=%d", cdp->bMaxPower * 2, 0, 0, 0);
/* Check if we have enough power. */
#if 0 /* this is a no-op, see above */
@@ -632,14 +632,15 @@ usbd_set_config_index(usbd_device_handle
#endif
#ifdef USB_DEBUG
if (dev->ud_powersrc == NULL) {
- DPRINTF(("usbd_set_config_index: No power source?\n"));
+ DPRINTF("No power source?", 0, 0, 0, 0);
err = USBD_IOERROR;
goto bad;
}
#endif
power = cdp->bMaxPower * 2;
if (power > dev->ud_powersrc->up_power) {
- DPRINTF(("power exceeded %d %d\n", power, dev->ud_powersrc->up_power));
+ DPRINTF("power exceeded %d %d", power, dev->ud_powersrc->up_power,
+ 0, 0);
/* XXX print nicer message. */
if (msg)
printf("%s: device addr %d (config %d) exceeds power "
@@ -654,13 +655,11 @@ usbd_set_config_index(usbd_device_handle
dev->ud_selfpowered = selfpowered;
/* Set the actual configuration value. */
- DPRINTF(("usbd_set_config_index: set config %d\n",
- cdp->bConfigurationValue));
+ DPRINTF("set config %d", cdp->bConfigurationValue, 0, 0, 0);
err = usbd_set_config(dev, cdp->bConfigurationValue);
if (err) {
- DPRINTF(("usbd_set_config_index: setting config=%d failed, "
- "error=%s\n",
- cdp->bConfigurationValue, usbd_errstr(err)));
+ DPRINTF("setting config=%d failed, error=%d",
+ cdp->bConfigurationValue, err, 0, 0);
goto bad;
}
@@ -672,7 +671,7 @@ usbd_set_config_index(usbd_device_handle
err = USBD_NOMEM;
goto bad;
}
- DPRINTFN(5,("usbd_set_config_index: dev=%p cdesc=%p\n", dev, cdp));
+ DPRINTFN(5, "dev=%p cdesc=%p", dev, cdp, 0, 0);
dev->ud_cdesc = cdp;
dev->ud_config = cdp->bConfigurationValue;
for (ifcidx = 0; ifcidx < nifc; ifcidx++) {
@@ -707,9 +706,10 @@ usbd_setup_pipe_flags(usbd_device_handle
usbd_pipe_handle p;
usbd_status err;
+ USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
p = kmem_alloc(dev->ud_bus->ub_pipesize, KM_SLEEP);
- DPRINTFN(1,("usbd_setup_pipe: dev=%p iface=%p ep=%p pipe=%p\n",
- dev, iface, ep, p));
+ DPRINTFN(1, "dev=%p iface=%p ep=%p pipe=%p", dev, iface, ep, p);
if (p == NULL)
return USBD_NOMEM;
p->up_dev = dev;
@@ -726,9 +726,8 @@ usbd_setup_pipe_flags(usbd_device_handle
SIMPLEQ_INIT(&p->up_queue);
err = dev->ud_bus->ub_methods->ubm_open(p);
if (err) {
- DPRINTFN(-1,("usbd_setup_pipe: endpoint=0x%x failed, error="
- "%s\n",
- ep->ue_edesc->bEndpointAddress, usbd_errstr(err)));
+ DPRINTF("endpoint=0x%x failed, error=%d",
+ ep->ue_edesc->bEndpointAddress, err, 0, 0);
kmem_intr_free(p, dev->ud_bus->ub_pipesize);
return err;
}
@@ -908,28 +907,25 @@ usbd_probe_and_attach(device_t parent, u
int confi, nifaces;
usbd_status err;
+ USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
/* First try with device specific drivers. */
- DPRINTF(("usbd_probe_and_attach: trying device specific drivers\n"));
+ DPRINTF("trying device specific drivers", 0, 0, 0, 0);
err = usbd_attachwholedevice(parent, dev, port, 0);
if (dev->ud_nifaces_claimed || err)
return err;
- DPRINTF(("usbd_probe_and_attach: no device specific driver found\n"));
+ DPRINTF("no device specific driver found", 0, 0, 0, 0);
- DPRINTF(("usbd_probe_and_attach: looping over %d configurations\n",
- dd->bNumConfigurations));
+ DPRINTF("looping over %d configurations", dd->bNumConfigurations,
+ 0, 0, 0);
for (confi = 0; confi < dd->bNumConfigurations; confi++) {
- DPRINTFN(1,("usbd_probe_and_attach: trying config idx=%d\n",
- confi));
+ DPRINTFN(1, "trying config idx=%d", confi, 0, 0, 0);
err = usbd_set_config_index(dev, confi, 1);
if (err) {
-#ifdef USB_DEBUG
- DPRINTF(("%s: port %d, set config at addr %d failed, "
- "error=%s\n", device_xname(parent), port,
- addr, usbd_errstr(err)));
-#else
+ DPRINTF("port %d, set config at addr %d failed, "
+ "error=%d", port, addr, err, 0);
printf("%s: port %d, set config at addr %d failed\n",
device_xname(parent), port, addr);
-#endif
return err;
}
nifaces = dev->ud_cdesc->bNumInterface;
@@ -955,7 +951,7 @@ usbd_probe_and_attach(device_t parent, u
if (dd->bNumConfigurations > 1) /* don't change if only 1 config */
usbd_set_config_index(dev, 0, 0);
- DPRINTF(("usbd_probe_and_attach: no interface drivers found\n"));
+ DPRINTF("no interface drivers found", 0, 0, 0, 0);
/* Finally try the generic driver. */
err = usbd_attachwholedevice(parent, dev, port, 1);
@@ -965,7 +961,8 @@ usbd_probe_and_attach(device_t parent, u
* We just did not find any drivers, that's all. The device is
* fully operational and not harming anyone.
*/
- DPRINTF(("usbd_probe_and_attach: generic attach failed\n"));
+ DPRINTF("generic attach failed", 0, 0, 0, 0);
+
return USBD_NORMAL_COMPLETION;
}
@@ -1062,8 +1059,9 @@ usbd_new_device(device_t parent, usbd_bu
int i;
int p;
- DPRINTF(("usbd_new_device bus=%p port=%d depth=%d speed=%d\n",
- bus, port, depth, speed));
+ USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
+ DPRINTF("bus=%p port=%d depth=%d speed=%d", bus, port, depth, speed);
if (bus->ub_methods->ubm_newdev != NULL)
return (bus->ub_methods->ubm_newdev)(parent, bus, depth, speed,
@@ -1128,7 +1126,7 @@ usbd_new_device(device_t parent, usbd_bu
}
panic("usbd_new_device: cannot find HS port\n");
found:
- DPRINTFN(1,("usbd_new_device: high speed port %d\n", p));
+ DPRINTFN(1, "high speed port %d", p, 0, 0, 0);
} else {
dev->ud_myhsport = NULL;
}
@@ -1156,8 +1154,8 @@ usbd_new_device(device_t parent, usbd_bu
usbd_reset_port(up->up_parent, port, &ps);
}
if (err) {
- DPRINTFN(-1, ("usbd_new_device: addr=%d, getting first desc "
- "failed: %d\n", addr, err));
+ DPRINTF("addr=%d, getting first desc failed: %d", addr, err,
+ 0, 0);
usbd_remove_device(dev, up);
return err;
}
@@ -1178,22 +1176,20 @@ usbd_new_device(device_t parent, usbd_bu
}
}
- DPRINTF(("usbd_new_device: adding unit addr=%d, rev=%02x, class=%d, "
- "subclass=%d, protocol=%d, maxpacket=%d, len=%d, speed=%d\n",
- addr,UGETW(dd->bcdUSB), dd->bDeviceClass, dd->bDeviceSubClass,
- dd->bDeviceProtocol, dd->bMaxPacketSize, dd->bLength,
- dev->ud_speed));
+ DPRINTF("adding unit addr=%d, rev=%02x, class=%d, subclass=%d", addr,
+ UGETW(dd->bcdUSB), dd->bDeviceClass, dd->bDeviceSubClass);
+ DPRINTF("protocol=%d, maxpacket=%d, len=%d, speed=%d",
+ dd->bDeviceProtocol, dd->bMaxPacketSize, dd->bLength, dev->ud_speed);
if (dd->bDescriptorType != UDESC_DEVICE) {
/* Illegal device descriptor */
- DPRINTFN(-1,("usbd_new_device: illegal descriptor %d\n",
- dd->bDescriptorType));
+ DPRINTF("illegal descriptor %d", dd->bDescriptorType, 0, 0, 0);
usbd_remove_device(dev, up);
return USBD_INVAL;
}
if (dd->bLength < USB_DEVICE_DESCRIPTOR_SIZE) {
- DPRINTFN(-1,("usbd_new_device: bad length %d\n", dd->bLength));
+ DPRINTF("bad length %d", dd->bLength, 0, 0, 0);
usbd_remove_device(dev, up);
return USBD_INVAL;
}
@@ -1205,16 +1201,16 @@ usbd_new_device(device_t parent, usbd_bu
err = usbd_setup_pipe_flags(dev, 0, &dev->ud_ep0, USBD_DEFAULT_INTERVAL,
&dev->ud_pipe0, USBD_MPSAFE);
if (err) {
- DPRINTFN(-1, ("usbd_new_device: setup default pipe failed\n"));
+ DPRINTF("setup default pipe failed err %d", err, 0, 0, 0);
usbd_remove_device(dev, up);
return err;
}
/* Set the address */
- DPRINTFN(5, ("usbd_new_device: setting device address=%d\n", addr));
+ DPRINTFN(5, "setting device address=%d", addr, 0, 0, 0);
err = usbd_set_address(dev, addr);
if (err) {
- DPRINTFN(-1, ("usbd_new_device: set address %d failed\n", addr));
+ DPRINTF("set address %d failed, err = %d", addr, err, 0, 0);
err = USBD_SET_ADDR_FAILED;
usbd_remove_device(dev, up);
return err;
@@ -1230,15 +1226,15 @@ usbd_new_device(device_t parent, usbd_bu
err = usbd_setup_pipe_flags(dev, 0, &dev->ud_ep0, USBD_DEFAULT_INTERVAL,
&dev->ud_pipe0, USBD_MPSAFE);
if (err) {
- DPRINTFN(-1, ("usbd_new_device: setup default pipe failed\n"));
+ DPRINTF("setup default pipe failed, err = %d", err, 0, 0, 0);
usbd_remove_device(dev, up);
return err;
}
err = usbd_reload_device_desc(dev);
if (err) {
- DPRINTFN(-1, ("usbd_new_device: addr=%d, getting full desc "
- "failed\n", addr));
+ DPRINTF("addr=%d, getting full desc failed, err = %d", addr,
+ err, 0, 0);
usbd_remove_device(dev, up);
return err;
}
@@ -1247,8 +1243,7 @@ usbd_new_device(device_t parent, usbd_bu
dev->ud_power = USB_MIN_POWER;
dev->ud_selfpowered = 0;
- DPRINTF(("usbd_new_device: new dev (addr %d), dev=%p, parent=%p\n",
- addr, dev, parent));
+ DPRINTF("new dev (addr %d), dev=%p, parent=%p", addr, dev, parent, 0);
usbd_add_dev_event(USB_EVENT_DEVICE_ATTACH, dev);
@@ -1287,7 +1282,9 @@ void
usbd_remove_device(usbd_device_handle dev, struct usbd_port *up)
{
- DPRINTF(("usbd_remove_device: %p\n", dev));
+ USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
+ DPRINTF("dev %p", dev, 0, 0, 0);
if (dev->ud_pipe0 != NULL)
usbd_kill_pipe(dev->ud_pipe0);
@@ -1302,7 +1299,6 @@ usbd_print(void *aux, const char *pnp)
{
struct usb_attach_arg *uaa = aux;
- DPRINTFN(15, ("usbd_print dev=%p\n", uaa->device));
if (pnp) {
#define USB_DEVINFO 1024
char *devinfo;
@@ -1335,7 +1331,6 @@ usbd_ifprint(void *aux, const char *pnp)
{
struct usbif_attach_arg *uaa = aux;
- DPRINTFN(15, ("usbd_print dev=%p\n", uaa->device));
if (pnp)
return QUIET;
aprint_normal(" port %d", uaa->port);
@@ -1546,8 +1541,8 @@ usb_disconnect_port(struct usbd_port *up
const char *hubname = device_xname(parent);
int i, rc;
- DPRINTFN(3,("uhub_disconnect: up=%p dev=%p port=%d\n",
- up, dev, up->up_portno));
+ USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+ DPRINTFN(3, "up=%p dev=%p port=%d", up, dev, up->up_portno, 0);
if (dev == NULL) {
#ifdef DIAGNOSTIC
@@ -1557,7 +1552,7 @@ usb_disconnect_port(struct usbd_port *up
}
if (dev->ud_subdevlen > 0) {
- DPRINTFN(3,("usb_disconnect_port: disconnect subdevs\n"));
+ DPRINTFN(3, "disconnect subdevs", 0, 0, 0, 0);
for (i = 0; i < dev->ud_subdevlen; i++) {
if ((subdev = dev->ud_subdevs[i]) == NULL)
continue;