From: Daniel Mack Date: Fri, 10 Jul 2009 09:04:58 +0000 (+0200) Subject: USB: fix LANGID=0 regression X-Git-Tag: v2.6.31-rc3~4^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cce2eda19923e5e5ccc8b042dec5af87b3ffad0;p=pandora-kernel.git USB: fix LANGID=0 regression commit b7af0bb ("USB: allow malformed LANGID descriptors") broke support for devices without string descriptor support. Reporting string descriptors is optional to USB devices, and a device lets us know it can't deal with strings by responding to the LANGID request with a STALL token. The kernel handled that correctly before b7af0bb came in, but failed hard if the LANGID was reported but broken. More than that, if a device was not able to provide string descriptors, the LANGID was retrieved over and over again at each string read request. This patch changes the behaviour so that a) the LANGID is only queried once b) devices which can't handle string requests are not asked again c) devices with malformed LANGID values have a sane fallback to 0x0409 Signed-off-by: Daniel Mack Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed