linux/drivers
Jason Gerecke 993f0d93f8 HID: wacom: generic: Send MSC_SERIAL and ABS_MISC when leaving prox
The latest generation of pro devices (MobileStudio Pro, 2nd-gen Intuos
Pro, Cintiq Pro) send a serial number of '0' whenever the pen is too far
away for reliable communication. Userspace defines that a serial number
of '0' is invalid, so we need to be careful not to actually forward
this value. Additionally, since EMR ISDv4 devices do not support serial
numbers or tool IDs, we'd like to not send these events if they aren't
necessary.

The existing code achieves these goals by adding a check for a non-zero
serial number within the wacom_wac_pen_report function. The MSC_SERIAL
and ABS_MISC events are only sent if the serial number is non-zero. This
code fails, however when the pen for a pro device leaves proximity. When
the pen leaves prox and the tablet sends a serial of 0, wacom_wac_pen_event
dutifully clears the serial number. When wacom_wac_pen_report is called,
it does not send either the MSC_SERIAL of the exiting tool nor an ABS_MISC
event.

This patch prevents the wacom_wac_pen_event function from clearing an
already-set serial number. This ensures that we have the serial number
handy when exiting proximity, but requires us to manually clear it
afterwards to ensure the driver does not send stale data (e.g. when
switching between AES pens that report a serial nubmer of 0 for the
first few fully in-proximity packets).

Fixes: f85c9dc678 ("HID: wacom: generic: Support tool ID and additional tool types")
Cc: stable # v4.10 <stable@vger.kernel.org>
Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
History 2017-09-13 19:14:48 +02:00
..
accessibility printk: move braille console support into separate braille.[ch] files 2013-07-31 14:41:03 -07:00
acpi arm64 updates for 4.14: 2017-09-05 09:53:37 -07:00
amba amba: use dev_groups and not dev_attrs for bus_type 2017-06-09 11:00:45 +02:00
android ANDROID: binder: don't queue async transactions to thread. 2017-09-01 09:22:50 +02:00
ata Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 08:13:52 -07:00
atm atm: zatm: Fix an error handling path in 'zatm_init_one()' 2017-07-18 11:37:46 -07:00
auxdisplay auxdisplay: constify charlcd_ops. 2017-07-17 17:23:16 +02:00
base driver core: bus: Fix a potential double free 2017-08-31 18:57:30 +02:00
bcma bcma: fill core OF info independently of bus type 2017-03-20 19:12:01 +02:00
block Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 11:52:29 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
bus bus: uniphier-system-bus: set up registers when resuming 2017-08-04 12:57:18 +02:00
cdrom block: don't set bounce limit in blk_init_queue 2017-06-27 12:13:45 -06:00
char Char/Misc drivers for 4.14-rc1 2017-09-05 11:08:17 -07:00
clk clk: keystone: sci-clk: Fix sci_clk_get 2017-08-02 18:37:26 -07:00
clocksource Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 13:06:34 -07:00
connector connector: make cn_proc explicitly non-modular 2016-07-05 11:40:47 -07:00
cpufreq cpufreq: intel_pstate: report correct CPU frequencies during trace 2017-08-11 01:25:53 +02:00
cpuidle smp: Avoid using two cache lines for struct call_single_data 2017-08-29 15:14:38 +02:00
crypto crypto: ixp4xx - Fix error handling path in 'aead_perform()' 2017-08-09 20:01:33 +08:00
dax - A few DM integrity fixes that improve performance. One that address 2017-07-28 12:17:17 -07:00
dca dmaengine: ioatdma: constify dca_ops structures 2015-11-16 09:27:32 +05:30
devfreq PM / devfreq: constify attribute_group structures. 2017-07-06 10:17:24 +09:00
dio dio: use probe_kernel_read() 2017-05-27 15:41:45 -04:00
dma dmaengine: tegra210-adma: fix of_irq_get() error check 2017-08-09 11:39:16 +05:30
dma-buf dma-buf: fix reservation_object_wait_timeout_rcu to wait correctly v2 2017-08-14 13:01:25 -04:00
edac EDAC, mce_amd: Get rid of local var in amd_filter_mce() 2017-08-21 17:59:38 +02:00
eisa Revert "EISA: Initialize device before its resources" 2014-01-17 14:57:29 -07:00
extcon extcon: max77693: Allow MHL attach notifier 2017-08-25 09:32:27 +09:00
firewire networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
firmware Char/Misc drivers for 4.14-rc1 2017-09-05 11:08:17 -07:00
fmc drivers/fmc: carrier can program FPGA on registration 2017-08-28 16:24:22 +02:00
fpga fpga: altera-hps2fpga: fix multiple init of l3_remap_lock 2017-08-10 14:27:55 -07:00
fsi drivers/fsi/scom: Remove reset before every putscom 2017-08-28 17:15:16 +02:00
gpio This is the bulk of the GPIO changes for the v4.14 cycle: 2017-09-05 11:49:48 -07:00
gpu Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 12:21:28 -07:00
hid HID: wacom: generic: Send MSC_SERIAL and ABS_MISC when leaving prox 2017-09-13 19:14:48 +02:00
hsi HSI changes for the v4.13 series 2017-07-04 14:28:22 -07:00
hv Drivers: hv: vmbus: Fix rescind handling issues 2017-08-16 09:16:29 -07:00
hwmon hwmon: (ltq-cputemp) add cpu temp sensor driver 2017-09-01 07:24:14 -07:00
hwspinlock hwspinlock: sprd: Add hardware spinlock driver 2017-05-17 10:52:52 -07:00
hwtracing stm class / intel_th: Updates for 4.14 2017-08-28 16:58:19 +02:00
i2c i2c: designware: Round down ACPI provided clk to nearest supported clk 2017-08-31 20:27:39 +02:00
ide ide: avoid warning for timings calculation 2017-07-21 04:37:22 +01:00
idle Merge branch 'x86/boot' into x86/mm, to pick up interacting changes 2017-07-18 11:36:53 +02:00
iio Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2017-09-05 11:54:41 -07:00
infiniband Updates for 4.14 kernel merge window 2017-09-03 17:49:17 -07:00
input Driver core update for 4.14-rc1 2017-09-05 10:41:21 -07:00
iommu Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 12:21:28 -07:00
ipack ipack: Improve a size determination in ipack_bus_register() 2017-05-18 16:59:06 +02:00
irqchip Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 13:08:27 -07:00
isdn mISDN: Fix null pointer dereference at mISDN_FsmNew 2017-08-11 14:56:23 -07:00
leds LED updates for 4.13 2017-07-06 11:32:40 -07:00
lightnvm lightnvm: pblk: advance bio according to lba index 2017-07-28 08:06:00 -06:00
macintosh Merge branch 'work.misc-set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-05 13:13:32 -07:00
mailbox mailbox: pcc: Fix crash when request PCC channel 0 2017-07-26 02:11:47 +02:00
mcb Char/Misc drivers for 4.14-rc1 2017-09-05 11:08:17 -07:00
md dm mpath: do not lock up a CPU with requeuing activity 2017-08-28 09:58:27 -04:00
media Linux 4.13-rc5 2017-08-15 16:16:58 +10:00
memory memory: atmel-ebi: Fix smc cycle xlate converter 2017-07-26 22:37:54 +02:00
memstick block: introduce new block status code type 2017-06-09 09:27:32 -06:00
message scsi: mpt: Move scsi_remove_host() out of mptscsih_remove_host() 2017-04-24 18:21:17 -04:00
mfd hwmon updates for v4.14 2017-09-03 18:43:20 -07:00
misc Char/Misc drivers for 4.14-rc1 2017-09-05 11:08:17 -07:00
mmc mmc: sdhci-xenon: add set_power callback 2017-08-30 14:11:47 +02:00
mtd mtd: nand: atmel: Relax tADL_min constraint 2017-08-24 20:59:50 -07:00
mux mux: make device_type const 2017-08-29 13:46:35 +02:00
net Merge branch 'parisc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2017-09-05 09:37:11 -07:00
nfc NFC 4.13 pull request 2017-07-01 14:30:39 -07:00
ntb ntb: transport shouldn't disable link due to bogus values in SPADs 2017-08-01 13:31:44 -04:00
nubus nubus: Fix pointer validation 2017-05-14 22:50:23 +02:00
nvdimm libnvdimm: fix badblock range handling of ARS range 2017-07-17 11:43:58 -07:00
nvme Updates for 4.14 kernel merge window 2017-09-03 17:49:17 -07:00
nvmem nvmem: core: remove unneeded NULL check 2017-08-28 17:33:23 +02:00
of of: fix DMA mask generation 2017-08-17 10:23:45 +02:00
oprofile sched/headers: Prepare to move the get_task_struct()/put_task_struct() and related APIs from <linux/sched.h> to <linux/sched/task.h> 2017-03-02 08:42:40 +01:00
parisc parisc: Fix up devices below a PCI-PCI MegaRAID controller bridge 2017-08-24 18:46:44 +02:00
parport Char/Misc drivers for 4.14-rc1 2017-09-05 11:08:17 -07:00
pci Updates for 4.14 kernel merge window 2017-09-03 17:49:17 -07:00
pcmcia pcmcia: ds: convert to use DRIVER_ATTR_RO 2017-06-12 16:14:30 +02:00
perf arm64: perf: Allow standard PMUv3 events to be extended by the CPU type 2017-08-08 17:12:34 +01:00
phy Char/Misc drivers for 4.14-rc1 2017-09-05 11:08:17 -07:00
pinctrl Revert "pinctrl: sunxi: Don't enforce bias disable (for now)" 2017-08-31 15:51:49 +02:00
platform platform/x86: intel-vbtn: match power button on press rather than release 2017-08-05 14:37:19 -07:00
pnp This is the bulk of GPIO changes for the v4.13 series: 2017-07-07 12:40:27 -07:00
power power: wm831x_power: Support USB charger current limit management 2017-08-15 15:05:01 +03:00
powercap powercap/RAPL: prevent overridding bits outside of the mask 2017-06-28 00:38:34 +02:00
pps drivers: pps: Make PPS into a menuconfig to ease disabling 2017-05-18 16:59:06 +02:00
ps3 sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
ptp ptp: introduce ptp auxiliary worker 2017-08-01 15:22:55 -07:00
pwm pwm: Changes for v4.13-rc1 2017-07-13 11:49:52 -07:00
rapidio char/misc patches for 4.12-rc1 2017-05-04 19:15:35 -07:00
ras arm64 updates for 4.13: 2017-07-05 17:09:27 -07:00
regulator Merge remote-tracking branches 'regulator/topic/rc5t619' and 'regulator/topic/stm32-vref' into regulator-next 2017-09-04 17:45:50 +01:00
remoteproc remoteproc/keystone: Fix circular dependencies for ARM configs 2017-06-27 16:21:34 -07:00
reset regulator: Convert to using %pOF instead of full_name 2017-07-19 11:56:01 +01:00
rpmsg rpmsg updates for v4.13 2017-07-06 15:38:31 -07:00
rtc rtc: ds1307: fix regmap config 2017-08-21 11:08:03 +02:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-09-05 09:45:46 -07:00
sbus sbus: Convert to using %pOF instead of full_name 2017-07-20 12:37:10 -07:00
scsi Merge branch 'parisc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2017-09-05 09:37:11 -07:00
sfi x86/boot: Fix memremap() related build failure 2017-07-20 11:37:58 +02:00
sh drivers/sh/intc/virq.c: delete an error message for a failed memory allocation in add_virq_to_pirq() 2017-07-06 16:24:30 -07:00
sn Drivers: misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
soc soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create 2017-08-21 09:19:50 +02:00
spi Merge remote-tracking branch 'spi/topic/xlp' into spi-next 2017-09-04 15:51:34 +01:00
spmi spmi: pmic-arb: Move the ownership check to irq_chip callback 2017-08-28 13:52:22 +02:00
ssb ssb: Delete an error message for a failed memory allocation in ssb_devices_register() 2017-05-24 16:46:51 +03:00
staging Staging/IIO driver updates for 4.14-rc1 2017-09-05 10:36:26 -07:00
target target: Fix node_acl demo-mode + uncached dynamic shutdown regression 2017-08-09 20:55:19 -07:00
tc TC: Error handling clean-ups 2014-11-24 07:45:25 +01:00
tee Linux 4.12-rc1 2017-05-18 23:54:47 -07:00
thermal Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2017-07-14 13:12:32 -07:00
thunderbolt thunderbolt: Fix reset response_type 2017-08-28 16:21:32 +02:00
tty Staging/IIO driver updates for 4.14-rc1 2017-09-05 10:36:26 -07:00
uio Merge 4.12-rc2 into char-misc-next 2017-05-22 08:56:55 +02:00
usb Char/Misc drivers for 4.14-rc1 2017-09-05 11:08:17 -07:00
uwb uwb: lc-rc: constify attribute_group structures. 2017-08-10 11:31:27 -07:00
vfio vfio/pci: Fix handling of RC integrated endpoint PCIe capability size 2017-07-27 10:39:33 -06:00
vhost Revert "vhost: cache used event for better performance" 2017-07-29 14:15:56 -07:00
video Driver core update for 4.14-rc1 2017-09-05 10:41:21 -07:00
virt drivers/virt/fsl_hypervisor.c: use get_user_pages_unlocked() 2017-05-08 17:15:10 -07:00
virtio Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 09:52:57 -07:00
vlynq drivers/vlynq/vlynq.c: fix another resource size off by 1 error 2014-01-23 16:36:55 -08:00
vme docs: Add kernel-doc comments to VME driver API 2017-03-17 15:10:49 +09:00
w1 drivers: w1: add hwmon temp support for w1_therm 2017-08-31 18:50:14 +02:00
watchdog Merge git://www.linux-watchdog.org/linux-watchdog 2017-07-11 09:59:37 -07:00
xen Driver core update for 4.14-rc1 2017-09-05 10:41:21 -07:00
zorro zorro: stop creating attributes by hand 2017-03-17 15:10:49 +09:00
Kconfig mux: minimal mux subsystem 2017-06-03 19:29:26 +09:00
Makefile x86/lguest: Remove lguest support 2017-08-24 09:57:28 +02:00