From: <ai...@ba...> - 2004-07-26 11:50:56
|
Quoting Kjetil Kjernsmo <kj...@kj...>: > Hi! >=20 > I'm trying to set aside some time to grok the patch you sent me... >=20 > For one thing, I have now produced a set of logs and output from variou= s=20 > parts of the proc fs with the current running kernel, without your=20 > patch. They are now at > http://dev.kjernsmo.net/tmp/ruby-only-logs1/ > This stuff was produced just after the keyboard started generating=20 > events.=20 Unfortunately that is hardware bug. So nobody can locate the bug remotely. You must do it by yourself. > To quote the patch: >=20 > On 9. july 2004, 10:32, Aivils wrote: >=20 > > IMHO You should do gross hack by yourself > > > > --- hid-core.c 2004-06-17 10:37:47.000000000 +0300 > > +++ hid-core_.c 2004-07-09 11:12:43.045096352 +0300 > > @@ -1491,7 +1491,7 @@ static struct hid_blacklist { > > { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, > > HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, > > HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, > > USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET }, - { > > USB_VENDOR_ID_TANGTOP, USB_DEVICE_ID_TANGTOP_USBPS2, HID_QUIRK_NOGET > > }, + { USB_VENDOR_ID_TANGTOP, USB_DEVICE_ID_TANGTOP_USBPS2, > > HID_QUIRK_NOGET | HID_QUIRK_STOP_TANGTOP}, > > > > { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, > > HID_QUIRK_2WHEEL_MOUSE_HACK_BACK }, { USB_VENDOR_ID_CYPRESS, > > USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_EXTRA }, > > > > > > > > > > > > > > --- hid-input.c 2004-05-10 05:32:28.000000000 +0300 > > +++ hid-input_.c 2004-07-09 11:23:21.278070192 +0300 > > @@ -432,6 +432,13 @@ void hidinput_hid_event(struct hid_devic > > > > input_regs(input, regs); > > > > + /* debug wrong TANGTOP event */ > > + printk("HID_EVENT: type %d code %d \n", usage->type, > > usage->code); + /* stop wrong event */ >=20 >=20 > So, this is going to print some kind of code that I can use? >=20 > > + if ((hid->quirks & HID_QUIRK_STOP_TANGTOP) && > > + usage->type =3D=3D UNDESIRED_TYPE && usage->code =3D=3D > > UNDESIRED_CODE) + return; > > + >=20 > And this will "stop" the TANGTOP if I specify the type and code?=20 >=20 > But what will it mean to "stop"? Will it mean that the keyboard and=20 > mouse freezes rather than spewing out events? Or will it reset itself,=20 > or....? =20 TANGTOP device driver is marked by "HID_QUIRK_STOP_TANGTOP". If device produce spontaneus keypress events , then my patch is not=20 usable. But TANGTOP may produce recongnizable "wrong" events, which You stop. > > if (((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_EXTRA) && > > (usage->code =3D=3D BTN_EXTRA)) > > > > || ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_BACK) > > || && (usage->code =3D=3D BTN_BACK))) { > > > > if (value) > > > > > > > > --- hid.h 2004-05-10 05:31:57.000000000 +0300 > > +++ hid_.h 2004-07-09 11:11:41.563442984 +0300 > > @@ -211,6 +211,7 @@ struct hid_item { > > #define HID_QUIRK_2WHEEL_MOUSE_HACK_BACK 0x080 > > #define HID_QUIRK_2WHEEL_MOUSE_HACK_EXTRA 0x100 > > #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x200 > > +#define HID_QUIRK_STOP_TANGTOP 0x400 > > > > /* > > * This is the global environment of the parser. This information is > > > > > > >=20 >=20 >=20 > > This set of paches means You locate wrong event and leater stop it > > with # define UNDESIRED_TYPE > > # define UNDESIRED_CODE >=20 > Right.... :-)=20 >=20 > So, I should apply this patch, recompile the kernel. Then reproduce the= =20 > spewing of events, locate the error message beginning with HID_EVENT: > (in /var/log/messages?), and find the type and code, set the=20 > UNDESIRED_TYPE and UNDESIRED_CODE with them, recompile once more. >=20 > Have I got that right?=20 Right! > What would happen then, when the error is encountered? >=20 You should parry death-blow :) Aivils --------------------------------------------------------------------- Radical ringtones, java games, mobile phone logos, backgrounds http://sms= .BANDA.LV ! |