vserver 1.9.3
[linux-2.6.git] / drivers / usb / gadget / zero.c
index 4fa5e1c..a415a33 100644 (file)
@@ -399,7 +399,7 @@ static const struct usb_descriptor_header *hs_loopback_function [] = {
 static char                            manufacturer [40];
 static char                            serial [40];
 
-/* static strings, in iso 8859/1 */
+/* static strings, in UTF-8 */
 static struct usb_string               strings [] = {
        { STRING_MANUFACTURER, manufacturer, },
        { STRING_PRODUCT, longname, },
@@ -960,7 +960,8 @@ zero_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
                case USB_DT_STRING:
                        /* wIndex == language code.
                         * this driver only handles one language, you can
-                        * add others even if they don't use iso8859/1
+                        * add string tables for other languages, using
+                        * any UTF-8 characters
                         */
                        value = usb_gadget_get_string (&stringtab,
                                        ctrl->wValue & 0xff, req->buf);
@@ -1185,6 +1186,8 @@ autoconf_fail:
                device_desc.bcdDevice = __constant_cpu_to_le16 (0x0207);
        } else if (gadget_is_omap (gadget)) {
                device_desc.bcdDevice = __constant_cpu_to_le16 (0x0208);
+       } else if (gadget_is_lh7a40x(gadget)) {
+               device_desc.bcdDevice = __constant_cpu_to_le16 (0x0209);
        } else {
                /* gadget zero is so simple (for now, no altsettings) that
                 * it SHOULD NOT have problems with bulk-capable hardware.
@@ -1236,6 +1239,12 @@ autoconf_fail:
                loopback_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
        }
 
+       if (gadget->is_otg) {
+               otg_descriptor.bmAttributes |= USB_OTG_HNP,
+               source_sink_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+               loopback_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+       }
+
        usb_gadget_set_selfpowered (gadget);
 
        init_timer (&dev->resume);