RTL bug fixes

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3421 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-03-26 17:52:06 +00:00
parent 03d015f696
commit 52ffd1bf08
3 changed files with 14 additions and 13 deletions

View File

@ -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

View File

@ -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));

View File

@ -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