Fix USB stack regression in 2.6.11-rc5
PATCH 1/1 Fix USB stack regression in 2.6.11-rc5
Hi all,
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 has been introduced in version 2.6.11-rc1 and is due to a wrong comparison. Please find a patch below to fix that.
Bye,
Aurelien
drivers/usb/core/devio.c +1 -1
@@ -841,7 +841,7 @@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 ];
Signature · 4 lines
.''`. Aurelien Jarno GPG: 1024D/F1BCDB73 : :' : Debian GNU/Linux developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net
PATCH 1/1 USB: Fix usbfs regression
You are correct, the patch is valid, nice catch. Linus, please apply.
------------
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 has been introduced in version 2.6.11-rc1 and is due to a wrong comparison.
drivers/usb/core/devio.c +1 -1
@@ -841,7 +841,7 @@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 ];