All of lore.kernel.org
 help / color / mirror / Atom feed
* recent 2.6.x USB HID input weirdness
@ 2005-01-31  5:27 David S. Miller
  2005-01-31  5:52 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: David S. Miller @ 2005-01-31  5:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: vojtech


On sparc64 I just started getting this in my kernel logs
on 2.6.x-BK from hidinput_input_event:

warning: event field not found

I added some debugging:

hidinput_input_event: type[4] code [4] value[458759]
hidinput_input_event: type[4] code [4] value[458761]

This is on a Sun Type-6 USB keyboard.  It does this for
every key I press.  The keys work properly, just the
warning is printed (which makes the console kind of hard
to use :-)

I backed out the most recent change (included below)
to that code and the messages went away.

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/01/27 14:48:48+01:00 vojtech@silver.ucw.cz 
#   input: Enable scancode event generation in the HID driver. This should allow
#          changing HID->event mappings (via EVIOCS*) in the future and make 
#          debugging easier now.
#   
#   Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
# 
# drivers/usb/input/hid-input.c
#   2005/01/27 14:48:37+01:00 vojtech@silver.ucw.cz +7 -3
#   input: Enable scancode event generation in the HID driver. This should allow
#          changing HID->event mappings (via EVIOCS*) in the future.
# 
diff -Nru a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c
--- a/drivers/usb/input/hid-input.c	2005-01-30 20:56:15 -08:00
+++ b/drivers/usb/input/hid-input.c	2005-01-30 20:56:15 -08:00
@@ -403,11 +403,12 @@
 	if (!input)
 		return;
 
+	input_regs(input, regs);
+	input_event(input, EV_MSC, MSC_SCAN, usage->hid);
+
 	if (!usage->type)
 		return;
 
-	input_regs(input, regs);
-
 	if (((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_5) && (usage->hid == 0x00090005))
 		|| ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) {
 		if (value) hid->quirks |=  HID_QUIRK_2WHEEL_MOUSE_HACK_ON;
@@ -574,13 +575,16 @@
 				hidinput->input.id.product = le16_to_cpu(dev->descriptor.idProduct);
 				hidinput->input.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
 				hidinput->input.dev = &hid->intf->dev;
+
+				set_bit(EV_MSC, hidinput->input.evbit);
+				set_bit(MSC_SCAN, hidinput->input.mscbit);
 			}
 
 			for (i = 0; i < report->maxfield; i++)
 				for (j = 0; j < report->field[i]->maxusage; j++)
 					hidinput_configure_usage(hidinput, report->field[i],
 								 report->field[i]->usage + j);
-
+			
 			if (hid->quirks & HID_QUIRK_MULTI_INPUT) {
 				/* This will leave hidinput NULL, so that it
 				 * allocates another one if we have more inputs on



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

* Re: recent 2.6.x USB HID input weirdness
  2005-01-31  5:27 recent 2.6.x USB HID input weirdness David S. Miller
@ 2005-01-31  5:52 ` Marcel Holtmann
  2005-01-31  6:08   ` David S. Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2005-01-31  5:52 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Kernel Mailing List, Vojtech Pavlik

Hi Dave,

> On sparc64 I just started getting this in my kernel logs
> on 2.6.x-BK from hidinput_input_event:
> 
> warning: event field not found
> 
> I added some debugging:
> 
> hidinput_input_event: type[4] code [4] value[458759]
> hidinput_input_event: type[4] code [4] value[458761]
> 
> This is on a Sun Type-6 USB keyboard.  It does this for
> every key I press.  The keys work properly, just the
> warning is printed (which makes the console kind of hard
> to use :-)

take a look at this patch: http://lkml.org/lkml/2005/1/29/111

Regards

Marcel



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

* Re: recent 2.6.x USB HID input weirdness
  2005-01-31  5:52 ` Marcel Holtmann
@ 2005-01-31  6:08   ` David S. Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David S. Miller @ 2005-01-31  6:08 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-kernel, vojtech

On Mon, 31 Jan 2005 06:52:34 +0100
Marcel Holtmann <marcel@holtmann.org> wrote:

> take a look at this patch: http://lkml.org/lkml/2005/1/29/111

That certainly fixes it, thanks :-)

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

end of thread, other threads:[~2005-01-31  6:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-31  5:27 recent 2.6.x USB HID input weirdness David S. Miller
2005-01-31  5:52 ` Marcel Holtmann
2005-01-31  6:08   ` David S. Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.