linux-2.4 cset 1.736.3.2 breaks USB hubs , deadlock

Olaf Hering (olh@suse.de)
Fri, 1 Nov 2002 22:28:52 +0100


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 <olaf@suse.de> -----

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 <olaf@suse.de>
To: olh@suse.de

old status OK
ChangeSet
1.736.3.2 02/10/11 11:02:13 acme@conectiva.com.br +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 acme@conectiva.com.br[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 acme@conectiva.com.br 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.
# --------------------------------------------
#
diff -Nru a/drivers/usb/hid-input.c b/drivers/usb/hid-input.c
--- a/drivers/usb/hid-input.c Tue Oct 15 06:05:50 2002
+++ b/drivers/usb/hid-input.c Tue Oct 15 06:05:50 2002
@@ -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 -----

-- 
 $ man Notes

BUGS You need http://www.sauerstoff-laden.de/ soon... - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/