Re: Using default LANGID = 0 causes a regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi again!

Thanks for the patch. Unfortunately it didn't solve the problem. 

Jouni Susiluoto



On Thursday 09 July 2009 18:04:05 Alan Stern wrote:
> Daniel:
>
> Your "USB: allow malformed LANGID descriptors" patch (commit
> b7af0bb26899bb47ae16fb41d2296111b0784a56) is causing a regression:
>
> 	http://bugzilla.kernel.org/show_bug.cgi?id=13700
>
> The usbmon log attached to comment #11 shows how the 5-2 device
> doesn't work with this patch.  It rejects attempts to read string 0
> (the language ID list) with a STALL, and it crashes when the kernel
> attempts to read a string using language 0.
>
> In fact, 0x0409 (US English) would probably be a better fallback than
> 0, since it is so common.  But I don't know whether this particular
> device would be able to handle that either.  Jouni, you should try the
> patch below (on vanilla 2.6.30) to see what happens.
>
> Maybe changing the default will work, maybe there should be a
> NO_STRINGS quirk, or maybe the commit should be reverted.  I don't know
> which would be best.
>
> Alan Stern
>
>
>
> Index: 2.6.30/drivers/usb/core/message.c
> 
===================================================================
> --- 2.6.30.orig/drivers/usb/core/message.c
> +++ 2.6.30/drivers/usb/core/message.c
> @@ -799,6 +799,7 @@ int usb_string(struct usb_device *dev, i
>
>  	/* get langid for strings if it's not yet known */
>  	if (!dev->have_langid) {
> +		dev->string_langid = 0x0409;	/* Fall back to English */
>  		err = usb_string_sub(dev, 0, 0, tbuf);
>  		if (err < 0) {
>  			dev_err(&dev->dev,

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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux