From 91d7ec97068f5f1e98caba857f29a4242b14eb00 Mon Sep 17 00:00:00 2001 From: joe Date: Mon, 1 Apr 2002 13:50:42 +0000 Subject: [PATCH] Merge from NetBSD: ---------------------------- revision 1.26 date: 1999/11/28 22:49:53; author: augustss; state: Exp; lines: +12 -8 More USB_DEBUG and DIAGNOSTIC output. ---------------------------- --- sys/dev/usb/usbdi_util.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c index 3c5b10408fd0..fc124df60539 100644 --- a/sys/dev/usb/usbdi_util.c +++ b/sys/dev/usb/usbdi_util.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi_util.c,v 1.24 1999/11/17 23:00:50 augustss Exp $ */ +/* $NetBSD: usbdi_util.c,v 1.26 1999/11/28 22:49:53 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -73,6 +73,9 @@ usbd_get_desc(dev, type, index, len, desc) { usb_device_request_t req; + DPRINTFN(3,("usbd_get_desc: type=%d, index=%d, len=%d\n", + type, index, len)); + req.bmRequestType = UT_READ_DEVICE; req.bRequest = UR_GET_DESCRIPTOR; USETW2(req.wValue, type, index); @@ -82,21 +85,20 @@ usbd_get_desc(dev, type, index, len, desc) } usbd_status -usbd_get_config_desc(dev, conf, d) - usbd_device_handle dev; - int conf; - usb_config_descriptor_t *d; +usbd_get_config_desc(usbd_device_handle dev, int confidx, + usb_config_descriptor_t *d) { usbd_status err; - DPRINTFN(3,("usbd_get_config_desc: conf=%d\n", conf)); - err = usbd_get_desc(dev, UDESC_CONFIG, conf, - USB_CONFIG_DESCRIPTOR_SIZE, d); + DPRINTFN(3,("usbd_get_config_desc: confidx=%d\n", confidx)); + err = usbd_get_desc(dev, UDESC_CONFIG, confidx, + USB_CONFIG_DESCRIPTOR_SIZE, d); if (err) return (err); if (d->bDescriptorType != UDESC_CONFIG) { - DPRINTFN(-1,("usbd_get_config_desc: conf %d, bad desc %d\n", - conf, d->bDescriptorType)); + DPRINTFN(-1,("usbd_get_config_desc: confidx=%d, bad desc " + "len=%d type=%d\n", + confidx, d->bLength, d->bDescriptorType)); return (USBD_INVAL); } return (USBD_NORMAL_COMPLETION);