aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2008-03-12 22:45:11 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-03-12 22:45:11 -0700
commit54cfa61c6c5b71f6e005870804ed0ef36d5f3190 (patch)
treea0fa36102bdb21057772bef005301f1c6a7f8270 /usb
parentf3a9f3f4dfcc7b91bff541556321560c9fa8cb60 (diff)
downloadpatches-54cfa61c6c5b71f6e005870804ed0ef36d5f3190.tar.gz
pci bugfix and usb gadgetfs bugfix
Diffstat (limited to 'usb')
-rw-r--r--usb/usb-fix-gadgetfs-class-request-delegation.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/usb/usb-fix-gadgetfs-class-request-delegation.patch b/usb/usb-fix-gadgetfs-class-request-delegation.patch
new file mode 100644
index 00000000000000..732dd9d16d04fe
--- /dev/null
+++ b/usb/usb-fix-gadgetfs-class-request-delegation.patch
@@ -0,0 +1,41 @@
+From david-b@pacbell.net Wed Mar 12 15:13:10 2008
+From: Roy Hashimoto <roy.hashimoto@gmail.com>
+Date: Wed, 12 Mar 2008 13:55:31 -0800
+Subject: USB: fix gadgetfs class request delegation
+Cc: linux-usb@vger.kernel.org, Greg KH <greg@kroah.com>
+Message-ID: <200803121455.31971.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+gadgetfs (drivers/usb/gadget/inode.c) was not delegating all
+non-device requests to userspace. This patch makes the handling of
+all request cases consistent.
+
+Signed-off-by: Roy Hashimoto <hashimot@alumni.caltech.edu>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/inode.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/gadget/inode.c
++++ b/drivers/usb/gadget/inode.c
+@@ -1458,7 +1458,7 @@ gadgetfs_setup (struct usb_gadget *gadge
+ /* currently one config, two speeds */
+ case USB_REQ_SET_CONFIGURATION:
+ if (ctrl->bRequestType != 0)
+- break;
++ goto unrecognized;
+ if (0 == (u8) w_value) {
+ value = 0;
+ dev->current_config = 0;
+@@ -1505,7 +1505,7 @@ gadgetfs_setup (struct usb_gadget *gadge
+ /* PXA automagically handles this request too */
+ case USB_REQ_GET_CONFIGURATION:
+ if (ctrl->bRequestType != 0x80)
+- break;
++ goto unrecognized;
+ *(u8 *)req->buf = dev->current_config;
+ value = min (w_length, (u16) 1);
+ break;