Commit 6101e249 authored by Aurelien Jarno's avatar Aurelien Jarno Committed by Linus Torvalds

[PATCH] USB: Fix usbfs regression

I have just tested kernel version 2.6.11-rc5 and noticed it is not
possible to do an USB transfer by submitting an URB to an output
endpoint.  This breaks newest versions of libusb and thus SANE, gphoto2,
and a lot of software.

The bug was introduced in version 2.6.11-rc1 and is due to a wrong
comparison. 
Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9c5a7d9d
......@@ -841,7 +841,7 @@ static int proc_submiturb(struct dev_state *ps, void __user *arg)
if ((ret = checkintf(ps, ifnum)))
return ret;
}
if ((uurb.endpoint & ~USB_ENDPOINT_DIR_MASK) != 0)
if ((uurb.endpoint & USB_ENDPOINT_DIR_MASK) != 0)
ep = ps->dev->ep_in [uurb.endpoint & USB_ENDPOINT_NUMBER_MASK];
else
ep = ps->dev->ep_out [uurb.endpoint & USB_ENDPOINT_NUMBER_MASK];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment