Hi Mario, W dniu 23.01.2015 o 21:52, Mario Schuknecht pisze:
Add missing case USB_EXT_PROP_UNICODE_MULTI to fill_ext_prop. Type vendor is coded in bRequestType. Compare USB_TYPE_VENDOR with bRequestType instead of bRequest.
The above seem to be unrelated changes. Please split into two separate patches, but see below.
Signed-off-by: Mario Schuknecht <mario.schuknecht@xxxxxxxxxxxxxxx> --- drivers/usb/gadget/composite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 6178353..3f7227b 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1418,6 +1418,7 @@ static int fill_ext_prop(struct usb_configuration *c, int interface, u8 *buf) case USB_EXT_PROP_UNICODE: case USB_EXT_PROP_UNICODE_ENV: case USB_EXT_PROP_UNICODE_LINK: + case USB_EXT_PROP_UNICODE_MULTI: usb_ext_prop_put_unicode(buf, ret, ext_prop->data, ext_prop->data_len);
While USB_EXT_PROP_UNICODE, USB_EXT_PROP_UNICODE_ENV and USB_EXT_PROP_UNICODE_LINK are defined as "A NULL-terminated Unicode string", USB_EXT_PROP_UNICODE_MULTI is defined as "Multiple NULL-terminated Unicode strings" - note the plural here. usb_ext_prop_put_unicode() internally calls utf8s_to_utf16s() and it seems that the latter is not designed to handle multiple strings in sequence. So I guess that either you should add a separate case or modify usb_ext_prop_unicode(). I'd prefer the first option and there perhaps usb_ext_prop_put_unicode() should be called in a loop. AP -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html