Fixes in wacom.c: SLAB_ATOMIC->GFP_KERNEL and count bug in open()
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 29/44 HID quirk (badpad) for NEC gamepad
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-04 09:21:42+01:00, [email protected]
input: Add a NEC USB gamepad to badpad blacklist.
hid-core.c | 4 ++++ 1 files changed, 4 insertions(+)
===================================================================
drivers/usb/input/hid-core.c +4 -0
@@ -1374,6 +1374,9 @@#define USB_VENDOR_ID_SAITEK 0x06a3#define USB_DEVICE_ID_SAITEK_RUMBLEPAD 0xff17 +#define USB_VENDOR_ID_NEC 0x073e +#define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301 +struct hid_blacklist {__u16 idVendor;__u16 idProduct;
@@ -1432,6 +1435,7 @@ { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_NEC, USB_DEVICE_ID_NEC_USB_GAME_PAD, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD },
PATCH 30/44 Separate HID quirks for different A4Tech mice
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-04 10:58:18+01:00, [email protected]
input: HID needs to distinguish between two types of A4Tech
two-wheel mice.
hid-core.c | 4 ++-- hid-input.c | 7 ++++--- hid.h | 19 ++++++++++--------- 3 files changed, 16 insertions(+), 14 deletions(-)
===================================================================
drivers/usb/input/hid-core.c +2 -2
@@ -1428,8 +1428,8 @@ { 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_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK }, - { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK }, + { 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 }, { USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
drivers/usb/input/hid-input.c +4 -3
@@ -377,7 +377,8 @@set_bit (usage->type, input->evbit);if ((usage->type ==EV_REL ) - && (device->quirks &HID_QUIRK_2WHEEL_MOUSE_HACK ) + && (device->quirks & (HID_QUIRK_2WHEEL_MOUSE_HACK_BACK + |HID_QUIRK_2WHEEL_MOUSE_HACK_EXTRA )) && (usage->code ==REL_WHEEL )) {set_bit (REL_HWHEEL , bit); }
@@ -431,8 +432,8 @@input_regs (input, regs); -if ((hid->quirks &HID_QUIRK_2WHEEL_MOUSE_HACK ) - && (usage->code ==BTN_BACK || usage->code ==BTN_EXTRA )) { +if (((hid->quirks &HID_QUIRK_2WHEEL_MOUSE_HACK_EXTRA ) && (usage->code ==BTN_EXTRA )) + || ((hid->quirks &HID_QUIRK_2WHEEL_MOUSE_HACK_BACK ) && (usage->code ==BTN_BACK ))) {if (value) hid->quirks |=HID_QUIRK_2WHEEL_MOUSE_HACK_ON ;else
drivers/usb/input/hid.h +10 -9
@@ -201,15 +201,16 @@* HID device quirks. */ -#define HID_QUIRK_INVERT 0x001 -#define HID_QUIRK_NOTOUCH 0x002 -#define HID_QUIRK_IGNORE 0x004 -#define HID_QUIRK_NOGET 0x008 -#define HID_QUIRK_HIDDEV 0x010 -#define HID_QUIRK_BADPAD 0x020 -#define HID_QUIRK_MULTI_INPUT 0x040 -#define HID_QUIRK_2WHEEL_MOUSE_HACK 0x080 -#define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x100 +#define HID_QUIRK_INVERT 0x001 +#define HID_QUIRK_NOTOUCH 0x002 +#define HID_QUIRK_IGNORE 0x004 +#define HID_QUIRK_NOGET 0x008 +#define HID_QUIRK_HIDDEV 0x010 +#define HID_QUIRK_BADPAD 0x020 +#define HID_QUIRK_MULTI_INPUT 0x040 +#define HID_QUIRK_2WHEEL_MOUSE_HACK_BACK 0x080 +#define HID_QUIRK_2WHEEL_MOUSE_HACK_EXTRA 0x100 +#define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x200/* * This is the global environment of the parser. This information is
PATCH 31/44 Fix i8042 PS/2 mouse on ARM
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-05 09:29:47+01:00, [email protected]
input: Fix i8042 PS/2 mouse on ARM.
drivers/input/serio/i8042-io.h | 3 +++ include/asm-arm/arch-ebsa285/irqs.h | 4 ++-- include/asm-arm/arch-shark/irqs.h | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-)
===================================================================
drivers/input/serio/i8042-io.h +3 -0
@@ -25,6 +25,9 @@#elif defined(__ia64__)# define I8042_KBD_IRQ isa_irq_to_vector(1)# define I8042_AUX_IRQ isa_irq_to_vector(12) +#elif defined(__arm__) +/* defined in include/asm-arm/arch-xxx/irqs.h */ +#include <asm/irq.h> #else # define I8042_KBD_IRQ 1# define I8042_AUX_IRQ 12
include/asm-arm/arch-ebsa285/irqs.h +2 -2
@@ -91,8 +91,8 @@#undef RTC_IRQ#define RTC_IRQ IRQ_ISA_RTC_ALARM -#undef AUX_IRQ -#define AUX_IRQ (machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE) +#define I8042_KBD_IRQ IRQ_ISA_KEYBOARD +#define I8042_AUX_IRQ (machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)#define IRQ_FLOPPYDISK IRQ_ISA_FLOPPY#define irq_canonicalize (_i) (((_i) == IRQ_ISA_CASCADE) ? IRQ_ISA_2 : _i)
include/asm-arm/arch-shark/irqs.h +2 -1
@@ -8,5 +8,6 @@#define IRQ_ISA_KEYBOARD 1#define RTC_IRQ 8 -#define AUX_IRQ 12 +#define I8042_KBD_IRQ 1 +#define I8042_AUX_IRQ 12#define IRQ_HARDDISK 14
PATCH 32/44 Update of Wacom driver from Ping Cheng (from Wacom)
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-08 10:09:44+01:00, [email protected]
input: Update the Wacom driver to latest version
from Ping Cheng from Wacom.
hid-core.c | 8 ++ wacom.c | 177 +++++++++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 150 insertions(+), 35 deletions(-)
===================================================================
drivers/usb/input/hid-core.c +7 -1
@@ -1320,6 +1320,8 @@#define USB_DEVICE_ID_WACOM_INTUOS 0x0020#define USB_DEVICE_ID_WACOM_PL 0x0030#define USB_DEVICE_ID_WACOM_INTUOS2 0x0040 +#define USB_DEVICE_ID_WACOM_VOLITO 0x0060 +#define USB_DEVICE_ID_WACOM_PTU 0x0003#define USB_VENDOR_ID_KBGEAR 0x084e#define USB_DEVICE_ID_KBGEAR_JAMSTUDIO 0x1001
@@ -1404,6 +1406,7 @@ { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 1, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 2, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 3, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 4, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 1, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 2, HID_QUIRK_IGNORE },
@@ -1415,11 +1418,14 @@ { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 3, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 4, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 5, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 1, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 2, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 3, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 4, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 5, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 7, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PTU, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET },
drivers/usb/input/wacom.c +143 -34
332 lines not on this page · raw message
PATCH 33/44 Fix for devices that need padded HID packets
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-08 10:09:44+01:00, [email protected]
input: Update the Wacom driver to latest version
from Ping Cheng from Wacom.
hid-core.c | 8 ++ wacom.c | 177 +++++++++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 150 insertions(+), 35 deletions(-)
===================================================================
drivers/usb/input/hid-core.c +7 -1
@@ -1320,6 +1320,8 @@#define USB_DEVICE_ID_WACOM_INTUOS 0x0020#define USB_DEVICE_ID_WACOM_PL 0x0030#define USB_DEVICE_ID_WACOM_INTUOS2 0x0040 +#define USB_DEVICE_ID_WACOM_VOLITO 0x0060 +#define USB_DEVICE_ID_WACOM_PTU 0x0003#define USB_VENDOR_ID_KBGEAR 0x084e#define USB_DEVICE_ID_KBGEAR_JAMSTUDIO 0x1001
@@ -1404,6 +1406,7 @@ { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 1, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 2, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 3, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 4, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 1, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 2, HID_QUIRK_IGNORE },
@@ -1415,11 +1418,14 @@ { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 3, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 4, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 5, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 1, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 2, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 3, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 4, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 5, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 7, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PTU, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET },
drivers/usb/input/wacom.c +143 -34
332 lines not on this page · raw message
PATCH 34/44 Fix a memory leak in ns558.c
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-08 12:51:07+01:00, [email protected]
input: Fix a memory leak in ns558.c
ns558.c | 1 + 1 files changed, 1 insertion(+)
===================================================================
drivers/input/gameport/ns558.c +1 -0
@@ -289,6 +289,7 @@#endif case NS558_ISA :release_region (port->gameport.io & ~(port->size -1 ), port->size); +kfree (port);break ;default :
PATCH 35/44 HID quirk (badpad) for Chic gamepad
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-08 13:16:03+01:00, [email protected]
input: Add a Chic gamepad into badpad quirk list.
hid-core.c | 4 ++++ 1 files changed, 4 insertions(+)
===================================================================
drivers/usb/input/hid-core.c +4 -0
@@ -1390,6 +1390,9 @@#define USB_VENDOR_ID_NEC 0x073e#define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301 +#define USB_VENDOR_ID_CHIC 0x05fe +#define USB_DEVICE_ID_CHIC_GAMEPAD 0x0014 +struct hid_blacklist {__u16 idVendor;__u16 idProduct;
@@ -1449,6 +1452,7 @@ { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_EXTRA }, { USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD, HID_QUIRK_BADPAD }, + { USB_VENDOR_ID_CHIC, USB_DEVICE_ID_CHIC_GAMEPAD, HID_QUIRK_BADPAD }, { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
PATCH 36/44 Don't define DEBUG in hid-ff by default
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-08 13:30:04+01:00, [email protected]
input: Don't define DEBUG in hid-ff by default. It spews messgaes
even when no FF device is present.
hid-ff.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
===================================================================
drivers/usb/input/hid-ff.c +1 -1
@@ -29,7 +29,7 @@#include <linux/input.h> -#define DEBUG +#undef DEBUG#include <linux/usb.h> #include "hid.h"
PATCH 37/44 Restore LED state in atkbd.c after resume
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-08 14:09:15+01:00, [email protected]
input: Restore LED state in atkbd.c after resume.
atkbd.c | 9 +++++++++ 1 files changed, 9 insertions(+)
===================================================================
drivers/input/keyboard/atkbd.c +9 -0
@@ -798,6 +798,7 @@ {struct atkbd *atkbd = serio->private;struct serio_dev *dev = serio->dev; +unsigned char param[1 ];if (!dev) {printk (KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n" );
@@ -805,11 +806,19 @@ }if (atkbd->write) { + param[0 ] = (test_bit (LED_SCROLLL , atkbd->dev.led) ?1 :0 ) + | (test_bit (LED_NUML , atkbd->dev.led) ?2 :0 ) + | (test_bit (LED_CAPSL , atkbd->dev.led) ?4 :0 ); +if (atkbd_probe (atkbd))return -1 ;if (atkbd->set !=atkbd_set_3 (atkbd))return -1 ; +atkbd_enable (atkbd); + +if (atkbd_command (atkbd, param,ATKBD_CMD_SETLEDS )) +return -1 ; }return 0 ;
PATCH 38/44 Fix oops (NULL pointer dereference) on resume in psmouse.c
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-08 14:32:00+01:00, [email protected]
input: Fix oops (NULL pointer dereference) on resume in psmouse.c,
when the mouse goes away while sleeping.
psmouse-base.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
===================================================================
drivers/input/mouse/psmouse-base.c +4 -2
@@ -643,12 +643,14 @@ {struct psmouse *psmouse = serio->private;struct serio_dev *dev = serio->dev; -int old_type = psmouse->type; +int old_type; -if (!dev) { +if (!dev || !psmouse) {printk (KERN_DEBUG "psmouse: reconnect request, but serio is disconnected, ignoring...\n" );return -1 ; } + + old_type = psmouse->type; psmouse->state =PSMOUSE_NEW_DEVICE ; psmouse->type = psmouse->acking = psmouse->cmdcnt = psmouse->pktcnt =0 ;
PATCH 39/44 Fix an endless loop in hid-core.c if device has empty reports
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-10 09:02:48+01:00, [email protected]
input: Avoid an endless loop in hid-core.c, if a device has some
empty reports.
hid-input.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-)
===================================================================
drivers/usb/input/hid-input.c +3 -1
@@ -569,8 +569,10 @@while (list != &report_enum->report_list) { report = (struct hid_report *) list; -if (!report->maxfield) +if (!report->maxfield) { + list = list->next;continue ; + }if (!hidinput) { hidinput =kmalloc (sizeof (*hidinput),GFP_KERNEL );
PATCH 40/44 Fix for HID devices which need nonzero idle for the ctrl pipe
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-10 09:05:31+01:00, [email protected]
input: When reading input reports from a device via the ctrl pipe,
set idle time of the device. This makes buggy devices which take the idle time into account for the ctrl pipe work.
hid-core.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-)
===================================================================
drivers/usb/input/hid-core.c +21 -2
@@ -1108,7 +1108,9 @@ hid->cr->wIndex =cpu_to_le16 (hid->ifnum); hid->cr->wLength =cpu_to_le16 (len); -dbg ("submitting ctrl urb" ); +dbg ("submitting ctrl urb: %s wValue=0x%04x wIndex=0x%04x wLength=%u" , + hid->cr->bRequest ==HID_REQ_SET_REPORT ?"Set_Report" :"Get_Report" , + hid->cr->wValue, hid->cr->wIndex, hid->cr->wLength);if (usb_submit_urb (hid->urbctrl,GFP_ATOMIC )) {err ("usb_submit_urb(ctrl) failed" );
@@ -1286,6 +1288,23 @@struct list_head *list;int err, ret; +/* +* The Set_Idle request is supposed to affect only the +* "Interrupt In" pipe. Unfortunately, buggy devices such as +* the BTC keyboard (ID 046e:5303) the request also affects +* Get_Report requests on the control pipe. In the worst +* case, if the device was put on idle for an indefinite +* amount of time (as we do below) and there are no input +* events to report, the Get_Report requests will just hang +* until we get a USB timeout. To avoid this, we temporarily +* establish a minimal idle time of 1ms. This shouldn't hurt +* bugfree devices and will cause a worst-case extra delay of +* 1ms for buggy ones. +*/ +usb_control_msg (hid->dev,usb_sndctrlpipe (hid->dev,0 ), +HID_REQ_SET_IDLE ,USB_TYPE_CLASS |USB_RECIP_INTERFACE , (1 <<8 ), + hid->ifnum,NULL ,0 ,HZ *USB_CTRL_SET_TIMEOUT ); + report_enum = hid->report_enum +HID_INPUT_REPORT ; list = report_enum->report_list.next;while (list != &report_enum->report_list) {
@@ -1319,7 +1338,7 @@while (list != &report_enum->report_list) { report = (struct hid_report *) list;usb_control_msg (hid->dev,usb_sndctrlpipe (hid->dev,0 ), -0x0a ,USB_TYPE_CLASS |USB_RECIP_INTERFACE , report->id, +HID_REQ_SET_IDLE ,USB_TYPE_CLASS |USB_RECIP_INTERFACE , report->id, hid->ifnum,NULL ,0 ,HZ *USB_CTRL_SET_TIMEOUT ); list = list->next; }
PATCH 41/44 Don't ignore PS/2 data immediately after disconnect
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-11 02:16:51-05:00, [email protected]
Input: when disconnecting PS/2 mouse give protocol's disconnect
handler chance to run before starting ignoring mouse data. Otherwise interrupt handler will discard all ACKs and the very first command in cleanup sequence will fail (Synaptics was failing to return to relative mode on module unload).
psmouse-base.c | 8 +++++--- psmouse.h | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-)
===================================================================
drivers/input/mouse/psmouse-base.c +5 -3
@@ -552,7 +552,7 @@ {struct psmouse *psmouse = serio->private; - psmouse->state =PSMOUSE_IGNORE ; + psmouse->state =PSMOUSE_CMD_MODE ;if (psmouse->ptport) {if (psmouse->ptport->deactivate)
@@ -565,6 +565,8 @@if (psmouse->disconnect) psmouse->disconnect (psmouse); + psmouse->state =PSMOUSE_IGNORE ; +input_unregister_device (&psmouse->dev);serio_close (serio);kfree (psmouse);
@@ -592,7 +594,7 @@ psmouse->dev.keybit[LONG (BTN_MOUSE )] =BIT (BTN_LEFT ) |BIT (BTN_MIDDLE ) |BIT (BTN_RIGHT ); psmouse->dev.relbit[0 ] =BIT (REL_X ) |BIT (REL_Y ); - psmouse->state =PSMOUSE_NEW_DEVICE ; + psmouse->state =PSMOUSE_CMD_MODE ; psmouse->serio = serio; psmouse->dev.private = psmouse;
@@ -650,7 +652,7 @@return -1 ; } - psmouse->state =PSMOUSE_NEW_DEVICE ; + psmouse->state =PSMOUSE_CMD_MODE ; psmouse->type = psmouse->acking = psmouse->cmdcnt = psmouse->pktcnt =0 ;if (psmouse->reconnect) {if (psmouse->reconnect (psmouse))
drivers/input/mouse/psmouse.h +2 -2
@@ -5,7 +5,7 @@#define PSMOUSE_CMD_SETRES 0x10e8#define PSMOUSE_CMD_GETINFO 0x03e9#define PSMOUSE_CMD_SETSTREAM 0x00ea -#define PSMOUSE_CMD_POLL 0x03eb +#define PSMOUSE_CMD_POLL 0x03eb#define PSMOUSE_CMD_GETID 0x02f2#define PSMOUSE_CMD_SETRATE 0x10f3#define PSMOUSE_CMD_ENABLE 0x00f4
@@ -18,7 +18,7 @@#define PSMOUSE_RET_NAK 0xfe/* psmouse states */ -#define PSMOUSE_NEW_DEVICE 0 +#define PSMOUSE_CMD_MODE 0#define PSMOUSE_ACTIVATED 1#define PSMOUSE_IGNORE 2
PATCH 42/44 Do a full reset of Synaptics touchpad if extended protocol probes failed
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-11 02:20:12-05:00, [email protected]
Input: do a full reset of Synaptics touchpad if extended protocol
probes failed, otherwise trackpoint on the pass-through port may stop working (reset-disable isn't enough to revive it)
psmouse-base.c | 23 +++++++++++++++++++++-- psmouse.h | 1 + synaptics.c | 13 +------------ 3 files changed, 23 insertions(+), 14 deletions(-)
===================================================================
drivers/input/mouse/psmouse-base.c +21 -2
@@ -287,6 +287,24 @@return 0 ; } + +/* +* psmouse_reset() resets the mouse into power-on state. +*/ +int psmouse_reset (struct psmouse *psmouse) +{ +unsigned char param[2 ]; + +if (psmouse_command (psmouse, param,PSMOUSE_CMD_RESET_BAT )) +return -1 ; + +if (param[0 ] !=PSMOUSE_RET_BAT && param[1 ] !=PSMOUSE_RET_ID ) +return -1 ; + +return 0 ; +} + +/* * Genius NetMouse magic init. */
@@ -416,6 +434,7 @@* pass through port it could get disabled while probing for protocol * extensions. */ +psmouse_reset (psmouse);psmouse_command (psmouse,NULL ,PSMOUSE_CMD_RESET_DIS ); }
@@ -540,8 +559,8 @@static void psmouse_cleanup (struct serio *serio) {struct psmouse *psmouse = serio->private; -unsigned char param[2 ]; -psmouse_command (psmouse, param,PSMOUSE_CMD_RESET_BAT ); + +psmouse_reset (psmouse); }/*
drivers/input/mouse/psmouse.h +1 -0
@@ -65,6 +65,7 @@#define PSMOUSE_SYNAPTICS 7int psmouse_command (struct psmouse *psmouse,unsigned char *param,int command); +int psmouse_reset (struct psmouse *psmouse);extern int psmouse_smartscroll;extern unsigned int psmouse_rate;
drivers/input/mouse/synaptics.c +1 -12
@@ -92,17 +92,6 @@return 0 ; } -static int synaptics_reset (struct psmouse *psmouse) -{ -unsigned char r[2 ]; - -if (psmouse_command (psmouse, r,PSMOUSE_CMD_RESET_BAT )) -return -1 ; -if (r[0 ] ==PSMOUSE_RET_BAT && r[1 ] ==PSMOUSE_RET_ID ) -return 0 ; -return -1 ; -} -/* * Read the model-id bytes from the touchpad * see also SYN_MODEL_* macros
@@ -197,7 +186,7 @@ {int retries =0 ; -while ((retries++ <3 ) &&synaptics_reset (psmouse)) +while ((retries++ <3 ) &&psmouse_reset (psmouse))printk (KERN_ERR "synaptics reset failed\n" );if (synaptics_identify (psmouse))
PATCH 43/44 Enable relative mode and gestures if Synaptics uses non-native protocol
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-11 02:27:59-05:00, [email protected]
Input: if Synaptics' absolute mode is disabled make sure that
touchpad is reset back to relative mode and gestures (taps) are enabled
psmouse-base.c | 4 ++++ synaptics.c | 8 +++++++- synaptics.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-)
===================================================================
drivers/input/mouse/psmouse-base.c +4 -0
@@ -389,6 +389,10 @@*/ psmouse_max_proto =PSMOUSE_IMEX ; } +/* +* Make sure that touchpad is in relative mode, gestures (taps) are enabled +*/ +synaptics_reset (psmouse); }if (psmouse_max_proto >PSMOUSE_IMEX &&genius_detect (psmouse)) {
drivers/input/mouse/synaptics.c +7 -1
@@ -357,9 +357,15 @@clear_bit (REL_Y , dev->relbit); } -static void synaptics_disconnect (struct psmouse *psmouse) +void synaptics_reset (struct psmouse *psmouse) { +/* reset touchpad back to relative mode, gestures enabled */ synaptics_mode_cmd (psmouse,0 ); +} + +static void synaptics_disconnect (struct psmouse *psmouse) +{ +synaptics_reset (psmouse);kfree (psmouse->private); }
drivers/input/mouse/synaptics.h +1 -0
@@ -12,6 +12,7 @@extern void synaptics_process_byte (struct psmouse *psmouse,struct pt_regs *regs);extern int synaptics_detect (struct psmouse *psmouse);extern int synaptics_init (struct psmouse *psmouse); +extern void synaptics_reset (struct psmouse *psmouse);/* synaptics queries */ #define SYN_QUE_IDENTIFY 0x00
PATCH 44/44 Fixes in wacom.c: SLAB_ATOMIC->GFP_KERNEL and count bug in open()
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input
===================================================================
[email protected], 2004-03-12 13:51:14+01:00, [email protected]
input: fixes in wacom.c
-use GFP_KERNEL where SLAB_ATOMIC is not needed
-fix count bug in open() error path
wacom.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
===================================================================
drivers/usb/input/wacom.c +4 -2
@@ -593,8 +593,10 @@return 0 ; wacom->irq->dev = wacom->usbdev; -if (usb_submit_urb (wacom->irq,GFP_KERNEL )) +if (usb_submit_urb (wacom->irq,GFP_KERNEL )) { + wacom->open--;return -EIO ; + }return 0 ; }
@@ -619,7 +621,7 @@return -ENOMEM ;memset (wacom,0 ,sizeof (struct wacom )); - wacom->data =usb_buffer_alloc (dev,10 ,SLAB_ATOMIC , &wacom->data_dma); + wacom->data =usb_buffer_alloc (dev,10 ,GFP_KERNEL , &wacom->data_dma);if (!wacom->data) {kfree (wacom);return -ENOMEM ;