Skip to content

USB ERROR:"bad descriptor, ignoring hub" #150

@GoogleCodeExporter

Description

@GoogleCodeExporter
启用了USB Stoarge Driver,初始化正常后,插上U盘,出现
"bad descriptor, ignoring hub"错误,该错误信息为hub 
driver中的hub_probe函数显
示的。
奇怪,插上U盘怎么可能调用到hub_probe函数?
调试发现是usb device driver中的static struct usb_device_id 
ddd_id_table的初始
化问题:
如usb/core/hub.c中
static struct usb_device_id hub_id_table [] = {
    { .match_flags = USB_DEVICE_ID_MATCH_DEV_CLASS,
      .bDeviceClass = USB_CLASS_HUB},
    { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS,
      .bInterfaceClass = USB_CLASS_HUB},
    { } /* Terminating entry */
};
最后一个使用"{}",但tmcc编译后并不能表示结构的所有项值0��
�所以必须手动修改
成 "{0,}",否则会导致usb/core/usb.c中的函数
const struct usb_device_id *usb_match_id(struct usb_interface  
                 *interface, const struct usb_device_id *id)
不能正确匹配设备的驱动。


Original issue reported on code.google.com by wenyong...@gmail.com on 10 Jul 2009 at 2:00

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions