The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] Fix USB stack regression in 2.6.11-rc5
@ 2005-02-26  2:25 Aurelien Jarno
  2005-02-26  4:24 ` [PATCH] USB: Fix usbfs regression Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Aurelien Jarno @ 2005-02-26  2:25 UTC (permalink / raw)
  To: linux-kernel, linux-usb-devel

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


Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

diff -urN linux-2.6.11-rc5.orig/drivers/usb/core/devio.c linux-2.6.11-rc5/drivers/usb/core/devio.c
--- linux-2.6.11-rc5.orig/drivers/usb/core/devio.c	2005-02-26 03:15:14.000000000 +0100
+++ linux-2.6.11-rc5/drivers/usb/core/devio.c	2005-02-26 03:16:15.000000000 +0100
@@ -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];
		

-- 
  .''`.  Aurelien Jarno	              GPG: 1024D/F1BCDB73
 : :' :  Debian GNU/Linux developer | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] USB: Fix usbfs regression
  2005-02-26  2:25 [PATCH] Fix USB stack regression in 2.6.11-rc5 Aurelien Jarno
@ 2005-02-26  4:24 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2005-02-26  4:24 UTC (permalink / raw)
  To: torvalds, Andrew Morton; +Cc: Aurelien Jarno, linux-kernel, linux-usb-devel

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.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>

diff -urN linux-2.6.11-rc5.orig/drivers/usb/core/devio.c linux-2.6.11-rc5/drivers/usb/core/devio.c
--- linux-2.6.11-rc5.orig/drivers/usb/core/devio.c	2005-02-26 03:15:14.000000000 +0100
+++ linux-2.6.11-rc5/drivers/usb/core/devio.c	2005-02-26 03:16:15.000000000 +0100
@@ -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];
		


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-26  4:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-26  2:25 [PATCH] Fix USB stack regression in 2.6.11-rc5 Aurelien Jarno
2005-02-26  4:24 ` [PATCH] USB: Fix usbfs regression Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox