this patch converts two if () BUG(); construct to BUG_ON();
which occupies less space, uses unlikely and is safer when
BUG() is disabled.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: "Ping Cheng" <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes some issues with the current wacom driver due to the split of
the driver into different pieces and adds support for the Intuos3 4x6
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.
The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).
Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.
Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.
I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.
This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);
I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().
Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.
(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.
(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.
Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
There is a bug in the current version of the itmtouch USB touchscreen
driver. The if statment that checks if pressure is being applied to the
touch screen is now missing a ! (not), so events are no longer being
reported correctly.
The original source code for this line was as follows:
#define UCP(x) ((unsigned char*)(x))
#define UCOM(x,y,z) ((UCP((x)->transfer_buffer)[y]) & (z))
...
if (!UCOM(urb, 7, 0x20)) {
And was cleaned to:
unsigned char *data = urb->transfer_buffer;
....
if (data[7] & 0x20) {
(note the lack of '!')
This has been tested on an LG L1510BF and an LG1510SF touch screen.
Signed-off-by: Mark Assad <massad@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits)
Input: wistron - add support for Acer TravelMate 2424NWXCi
Input: wistron - fix setting up special buttons
Input: add KEY_BLUETOOTH and KEY_WLAN definitions
Input: add new BUS_VIRTUAL bus type
Input: add driver for stowaway serial keyboards
Input: make input_register_handler() return error codes
Input: remove cruft that was needed for transition to sysfs
Input: fix input module refcounting
Input: constify input core
Input: libps2 - rearrange exports
Input: atkbd - support Microsoft Natural Elite Pro keyboards
Input: i8042 - disable MUX mode on Toshiba Equium A110
Input: i8042 - get rid of polling timer
Input: send key up events at disconnect
Input: constify psmouse driver
Input: i8042 - add Amoi to the MUX blacklist
Input: logips2pp - add sugnature 56 (Cordless MouseMan Wheel), cleanup
Input: add driver for Touchwin serial touchscreens
Input: add driver for Touchright serial touchscreens
Input: add driver for Penmount serial touchscreens
...
During Installation the host tries to enumerate the keyboard/mouse
dongle for the Raritan KVM.At this time timeouts have been observed
Adding the Raritan KVM USB dongle to the blacklist fixes this issue.
Signed-off-by: Raghavendra Biligiri <Raghavendra_Biligiri@Dell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The purpose of this patch is to split off the case when a device does
not reply on the lower level (which is reported by HC hardware), and
a case when the device accepted the request, but does not reply at
upper level. This redefinition allows to diagnose issues easier,
without asking the user if the -110 happened "immediately".
The usbmon splits such cases already thanks to its timestamp, but
it's not always available.
I adjusted all drivers which I found affected (by searching for "urb").
Out of tree drivers may suffer a little bit, but I do not expect much
breakage. At worst they may print a few messages.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Patch to add support for Alcor Micro Corp. USB 2.0 TO RS-232 converter.
This patch adds VID and PID to pl2303.[ch], adds it to the "HORRIBLE
HACK FOR PL2303" in usb-serial.c and also prevents cdc-acm to claim
driving this device by blacklisting it in hid-core.
Signed-off-by: Johannes Steingraeber <Jo_Stein@web.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch is a driver for the PlayStation 2 specific Trance Vibrator
device. The only thing that device can do is vibrate at various speeds.
Signed-off-by: Sam Hocevar <sam@zoy.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds support for Ontrak ADU USB devices.
Fixed for printk issues by Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Steven Haigh <netwiz@crc.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Making structs const prevents accidental bugs and with the proper debug
options they're protected against corruption.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- split wacom.c into 4 files: wacom.h, wacom_wac.h, wacom_sys.c, and wacom_wac.c
- where wacom_sys.c deals with system specific code,
- and wacom_wac.c deals with Wacom specific code
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
changes over 0.3:
- some more eGalax device IDs (from eGalax driver/spec)
- return the error code in probe()
- 3M/MTouch init fixes, tested by Don Alexander
- eGalax fixes for bugs in multi-packet handling, spottet by Pieter Grimmerink
- support for some eTurboTouch devices, mostly by Pieter Grimmerink
- support for Gunze AHL61 controller (untested, but simple enough)
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Pieter Grimmerink <p.grimmerink@inepro.com>
Cc: Don Alexander <debug@roosoft.ltd.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This driver add support for the Phidgets Inc., MotorControl via sysfs. Also
some minor fixes for the InterfaceKit.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes a memory leak and a kernel oops when trying to unload
the driver, due to an unbalanced cleanup.
Thanks Ivar Jensen for spotting my mistake.
Signed-off-by: Henk Vergonet <henk.vergonet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
On Fri, Sep 01, 2006 at 01:58:18AM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.18-rc4-mm3:
>...
> +gregkh-usb-hid-core.c-adds-all-gtco-calcomp-digitizers-and-interwrite-school-products-to-blacklist.patch
>...
> USB tree updates.
>...
The GNU C compiler spotted the following bug:
<-- snip -->
...
CC drivers/usb/input/hid-core.o
/home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/usb/input/hid-core.c:1446:1: warning: "USB_DEVICE_ID_GTCO_404" redefined
/home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/usb/input/hid-core.c:1445:1: warning: this is the location of the previous definition
...
<-- snip -->
This patch fixes this cut'n'paste error.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Adds all GTCO CalComp Digitizers and InterWrite School Products to
hid-core.c blacklist.
Signed-off-by: Jeremy A. Roberson <jroberson@gtcocalcomp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
appletouch uses urb->transfer_dma after having freed the urb, this shows
up only if the system is compiled with slab debugging. This patch fixes
it by reordering the free calls.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
By using milliseconds instead of jiffies to calculate acceleration
factor we make the code immune to changes in HZ.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
When emulating button toggle drivers need to send input_sync()
between 'down' and 'up' events, otherwise some users might miss
keypress because device's state is only considered finalized
after EV_SYN/SYN_REPORT is received.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
When HZ is set to 250 (new default) or 100, the time span during which
repeated events from the device are ignored could be too small due to
ms->jiffies rounding. This causes the auto repeat to kick in early making
it impossible for the user to generate individual press/release events.
Increate the timeout to compensate.
Signed-off-by: Marko Macek <Marko.Macek@gmx.net>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This replaces the older PID driver which was never completed.
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Move fixp-arith.h from drivers/usb/input to drivers/input, as the part of
force feedback support that requires trigonometric functions is being moved
there.
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch is to get the WiseGroup.,Ltd SmartJoy Dual Plus PS2-to-USB
Adapter [0x6677:0x8802] correctly detected. It sets the NOGET and
MULTI_INPUT quirks to make 2 joystick nodes appear in stead of only
one.
(As of yet, only confirmed working by myself.)
Signed-off-by: Navaho Gunleg <navahogunleg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix a mispelling of the korean alphabet name in the input subsystem.
See http://en.wikipedia.org/wiki/Hangeul#Names for more details.
KEY_HANGUEL left to not break people
Signed-off-by: Jerome Pinot <ngc891@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Move <linux/usb_input.h> to <linux/usb/input.h> and remove some
redundant includes.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This adds the Apple MacBook product IDs for the Fn translation
to the usbhid.
Signed-off-by: Rene Rebe <rene@exactcode.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>