From 87f624cb9d7f647560fa4249a8d22d04846c0748 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 26 Mar 2011 17:52:06 +0000 Subject: RTL bug fixes git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3421 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/olimex-lpc1766stk/wlan/defconfig | 4 ++-- nuttx/drivers/usbhost/usbhost_enumerate.c | 14 +++++++------- nuttx/drivers/usbhost/usbhost_findclass.c | 9 +++++---- 3 files changed, 14 insertions(+), 13 deletions(-) (limited to 'nuttx') diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig index 0d375c2c5..8edfc7ae3 100755 --- a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig @@ -903,5 +903,5 @@ CONFIG_HEAP_SIZE= # # USB WLAN device identification # -CONFIG_USB_WLAN_VID=0x0bda -CONFIG_USB_WLAN_PID=0x8189 +CONFIG_USB_WLAN_VID=0x148f +CONFIG_USB_WLAN_PID=0x3071 diff --git a/nuttx/drivers/usbhost/usbhost_enumerate.c b/nuttx/drivers/usbhost/usbhost_enumerate.c index 4c8c9c8c3..1c3a827bf 100755 --- a/nuttx/drivers/usbhost/usbhost_enumerate.c +++ b/nuttx/drivers/usbhost/usbhost_enumerate.c @@ -129,18 +129,19 @@ static inline int usbhost_devdesc(const struct usb_devdesc_s *devdesc, memset(id, 0, sizeof(struct usbhost_id_s)); - /* Pick off the ID info */ + /* Pick off the class ID info */ id->base = devdesc->class; id->subclass = devdesc->subclass; id->proto = devdesc->protocol; - uvdbg("class:%d subclass:%d protocol:%d\n", id->base, id->subclass, id->proto); - /* Yes, then pick off the VID and PID as well */ + /* Pick off the VID and PID as well (for vendor specfic devices) */ id->vid = usbhost_getle16(devdesc->vendor); id->pid = usbhost_getle16(devdesc->product); - uvdbg("vid:%d pid:%d\n", id->vid, id->pid); + + uvdbg("class:%d subclass:%04x protocol:%04x vid:%d pid:%d\n", + id->base, id->subclass, id->proto, id->vid, id->pid); return OK; } @@ -188,9 +189,8 @@ static inline int usbhost_configdesc(const uint8_t *configdesc, int cfglen, if (ifdesc->type == USB_DESC_TYPE_INTERFACE) { /* Yes, extract the class information from the interface descriptor. - * (We are going to need to do more than this here in the future: - * ID information might lie elsewhere and we will need the VID and - * PID as well). + * Typically these values are zero meaning that the "real" ID + * information resides in the device descriptor. */ DEBUGASSERT(remaining >= sizeof(struct usb_ifdesc_s)); diff --git a/nuttx/drivers/usbhost/usbhost_findclass.c b/nuttx/drivers/usbhost/usbhost_findclass.c index d4438d814..f08aff580 100644 --- a/nuttx/drivers/usbhost/usbhost_findclass.c +++ b/nuttx/drivers/usbhost/usbhost_findclass.c @@ -87,8 +87,9 @@ static bool usbhost_idmatch(const struct usbhost_id_s *classid, const struct usbhost_id_s *devid) { - uvdbg("Compare to class:%d subclass:%d protocol:%d\n", - classid->base, classid->subclass, classid->proto); + uvdbg("Compare to class:%d subclass:%d protocol:%d vid:%04x pid:%04x\n", + classid->base, classid->subclass, classid->proto, + classid->vid, classid->pid); /* The base class ID, subclass and protocol have to match up in any event */ @@ -156,8 +157,8 @@ const struct usbhost_registry_s *usbhost_findclass(const struct usbhost_id_s *id int ndx; DEBUGASSERT(id); - uvdbg("Looking for class:%d subclass:%d protocol:%d\n", - id->base, id->subclass, id->proto); + uvdbg("Looking for class:%d subclass:%d protocol:%d vid:%04x pid:%04x\n", + id->base, id->subclass, id->proto, id->vid, id->pid); /* g_classregistry is a singly-linkedlist of class ID information added by * calls to usbhost_registerclass(). Since this list is accessed from USB -- cgit v1.2.3