Skip to contentSkip to conversation

linux-2.4 cset 1.736.3.2 breaks USB hubs , deadlock

PATCH Olaf Hering 3 participants 3 messages Nov 1, 2002 – Nov 6, 2002 USB

lore
Share & tools
lore
#0 lore raw

What shoud this patch fix?

It locks up my iBook when attaching an Apple USB keyboard. Other people reported similar hangs.
Please revert it or find a better solution for 2.4.20.

----- Forwarded message from Olaf Hering <[email protected]> -----

Date: Tue, 15 Oct 2002 06:05:51 +0200
Subject: Incoming changes to linux-2.4 cset 1.736.3.2 mandarine.suse.de:/olaf/sources/tree/linux-2.4
From: Olaf Hering <[email protected]>
To: [email protected]

old status OK
ChangeSet
1.736.3.2 02/10/11 11:02:13 [email protected] +1 -0 [PATCH] hid-input: fix find_next_zero_bit usage

It was swapping the parameters, using the bitfield size for the offset and the offset for the bitfield size. With this the mouse buttons in my wireless USB keyboard finally works 8) 2.4 has the same problem.

drivers/usb/hid-input.c
1.3 02/10/09 18:26:11 [email protected][greg] +1 -1
hid-input: fix find_next_zero_bit usage

.........................................................................
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.736.3.1 -> 1.736.3.2
# drivers/usb/hid-input.c 1.2 -> 1.3
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/10/11 [email protected] 1.736.3.2
# [PATCH] hid-input: fix find_next_zero_bit usage
#

#   It was swapping the parameters, using the bitfield size for the
#   offset and the offset for the bitfield size. With this the mouse
#   buttons in my wireless USB keyboard finally works 8) 2.4 has the
#   same problem.

# --------------------------------------------
#

drivers/usb/hid-input.c +1 -1
diff -Nru a/drivers/usb/hid-input.c b/drivers/usb/hid-input.c
@@ -271,7 +271,7 @@
 	set_bit(usage->type, input->evbit);
 
 	while (usage->code <= max && test_and_set_bit(usage->code, bit)) {
-		usage->code = find_next_zero_bit(bit, max + 1, usage->code);
+		usage->code = find_next_zero_bit(bit, usage->code, max + 1);
 	}
 
 	if (usage->code > max) return;

.........................................................................

----- End forwarded message -----

Signature · 4 lines
 $ man Notes

BUGS
       You need http://www.sauerstoff-laden.de/ soon...
#1 lore raw
Quoted 5 lines · Olaf Hering

What shoud this patch fix?

It locks up my iBook when attaching an Apple USB keyboard. Other people reported similar hangs.
Please revert it or find a better solution for 2.4.20.

It's wrong and Marcelo said he would revert it. Marcelo, do you want me to make up a tree so that you can pull this change from?

thanks,

greg k-h

#2 lore raw
In reply to Olaf Hering
Quoted 5 lines · Olaf Hering

What shoud this patch fix?

It locks up my iBook when attaching an Apple USB keyboard. Other people reported similar hangs.
Please revert it or find a better solution for 2.4.20.

Olaf,

I already reverted it. Thanks.