aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-03-14 14:44:45 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-14 14:44:45 -0800
commite5d80d56cbb9674181c3625fc3c9bcdbaa3fd5ec (patch)
treefd90bc50929eb457f93efb18a52cd9ecfa685ba0 /usb
parent180abda08ab8e841b0dfbad3afcffb656d75c220 (diff)
downloadpatches-e5d80d56cbb9674181c3625fc3c9bcdbaa3fd5ec.tar.gz
more patches and updates
Diffstat (limited to 'usb')
-rw-r--r--usb/usb-fix-check_ctrlrecip-to-allow-control-transfers-in-state-address.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/usb/usb-fix-check_ctrlrecip-to-allow-control-transfers-in-state-address.patch b/usb/usb-fix-check_ctrlrecip-to-allow-control-transfers-in-state-address.patch
new file mode 100644
index 0000000000000..91a2942744afd
--- /dev/null
+++ b/usb/usb-fix-check_ctrlrecip-to-allow-control-transfers-in-state-address.patch
@@ -0,0 +1,41 @@
+From akpm@osdl.org Sat Mar 11 00:19:34 2006
+Message-Id: <200603110819.k2B8J2q3023867@shell0.pdx.osdl.net>
+From: Horst Schirmeier <horst@schirmeier.com>
+Subject: USB: fix check_ctrlrecip to allow control transfers in state ADDRESS
+To: horst@schirmeier.com, david-b@pacbell.net, greg@kroah.com,
+ stern@rowland.harvard.edu, mm-commits@vger.kernel.org
+Date: Sat, 11 Mar 2006 00:16:55 -0800
+
+
+From: Horst Schirmeier <horst@schirmeier.com>
+
+check_ctrlrecip() disallows any control transfers if the device is
+deconfigured (in configuration 0, ie. state ADDRESS). This for example
+makes it impossible to read the device descriptors without configuring the
+device, although most standard device requests are allowed in this state by
+the spec. This patch allows control transfers for the ADDRESS state, too.
+
+Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
+Cc: Alan Stern <stern@rowland.harvard.edu>
+Cc: David Brownell <david-b@pacbell.net>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+
+
+---
+ drivers/usb/core/devio.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- gregkh-2.6.orig/drivers/usb/core/devio.c
++++ gregkh-2.6/drivers/usb/core/devio.c
+@@ -493,7 +493,8 @@ static int check_ctrlrecip(struct dev_st
+ {
+ int ret = 0;
+
+- if (ps->dev->state != USB_STATE_CONFIGURED)
++ if (ps->dev->state != USB_STATE_ADDRESS
++ && ps->dev->state != USB_STATE_CONFIGURED)
+ return -EHOSTUNREACH;
+ if (USB_TYPE_VENDOR == (USB_TYPE_MASK & requesttype))
+ return 0;