kernel-fxtec-pro1x/drivers/hid
Jason Gerecke d8a2bd86bf HID: wacom: Avoid entering wacom_wac_pen_report for pad / battery
commit d9216d753b2b1406b801243b12aaf00a5ce5b861 upstream.

It has recently been reported that the "heartbeat" report from devices
like the 2nd-gen Intuos Pro (PTH-460, PTH-660, PTH-860) or the 2nd-gen
Bluetooth-enabled Intuos tablets (CTL-4100WL, CTL-6100WL) can cause the
driver to send a spurious BTN_TOUCH=0 once per second in the middle of
drawing. This can result in broken lines while drawing on Chrome OS.

The source of the issue has been traced back to a change which modified
the driver to only call `wacom_wac_pad_report()` once per report instead
of once per collection. As part of this change, pad-handling code was
removed from `wacom_wac_collection()` under the assumption that the
`WACOM_PEN_FIELD` and `WACOM_TOUCH_FIELD` checks would not be satisfied
when a pad or battery collection was being processed.

To be clear, the macros `WACOM_PAD_FIELD` and `WACOM_PEN_FIELD` do not
currently check exclusive conditions. In fact, most "pad" fields will
also appear to be "pen" fields simply due to their presence inside of
a Digitizer application collection. Because of this, the removal of
the check from `wacom_wac_collection()` just causes pad / battery
collections to instead trigger a call to `wacom_wac_pen_report()`
instead. The pen report function in turn resets the tip switch state
just prior to exiting, resulting in the observed BTN_TOUCH=0 symptom.

To correct this, we restore a version of the `WACOM_PAD_FIELD` check
in `wacom_wac_collection()` and return early. This effectively prevents
pad / battery collections from being reported until the very end of the
report as originally intended.

Fixes: d4b8efeb46d9 ("HID: wacom: generic: Correct pad syncing")
Cc: stable@vger.kernel.org # v4.17+
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
Tested-by: Ping Cheng <ping.cheng@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-05 11:08:50 +01:00
..
i2c-hid HID: i2c-hid: Always sleep 60ms after I2C_HID_PWR_ON commands 2020-09-03 11:24:26 +02:00
intel-ish-hid HID: intel-ish-hid: fixes incorrect error handling 2019-12-05 09:20:24 +01:00
usbhid HID: hiddev: Fix slab-out-of-bounds write in hiddev_ioctl_usage() 2020-09-03 11:24:31 +02:00
hid-a4tech.c
hid-accutouch.c
hid-alps.c HID: alps: support devices with report id 2 2020-07-29 10:16:51 +02:00
hid-apple.c HID: apple: Disable Fn-key key-re-mapping on clone keyboards 2020-07-29 10:16:52 +02:00
hid-appleir.c
hid-asus.c
hid-aureal.c
hid-axff.c
hid-belkin.c
hid-betopff.c
hid-cherry.c
hid-chicony.c
hid-cmedia.c
hid-core.c HID: core: Correctly handle ReportSize being zero 2020-09-09 19:04:22 +02:00
hid-corsair.c
hid-cougar.c
hid-cp2112.c
hid-cypress.c
hid-debug.c
hid-dr.c
hid-elan.c HID: elan: Fix memleak in elan_input_configured 2020-09-17 13:45:25 +02:00
hid-elecom.c
hid-elo.c
hid-emsff.c
hid-ezkey.c
hid-gaff.c
hid-gembird.c
hid-generic.c
hid-gfrm.c
hid-google-hammer.c HID: google: add moonball USB id 2020-03-20 11:55:59 +01:00
hid-gt683r.c
hid-gyration.c
hid-holtek-kbd.c
hid-holtek-mouse.c
hid-holtekff.c
hid-hyperv.c
hid-icade.c
hid-ids.h HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for all Saitek X52 devices 2020-09-17 13:45:25 +02:00
hid-input.c HID: hid-input: fix stylus battery reporting 2020-10-29 09:55:12 +01:00
hid-ite.c HID: ite: Only bind to keyboard USB interface on Acer SW5-012 keyboard dock 2020-03-05 16:42:18 +01:00
hid-jabra.c
hid-kensington.c
hid-keytouch.c
hid-kye.c
hid-lcpower.c
hid-led.c
hid-lenovo.c
hid-lg.c
hid-lg.h
hid-lg2ff.c
hid-lg3ff.c
hid-lg4ff.c
hid-lg4ff.h
hid-lgff.c
hid-logitech-dj.c
hid-logitech-hidpp.c HID: logitech-hidpp: Silence intermittent get_battery_capacity errors 2020-01-04 19:12:59 +01:00
hid-magicmouse.c HID: magicmouse: do not set up autorepeat 2020-07-22 09:32:08 +02:00
hid-mf.c
hid-microsoft.c
hid-monterey.c
hid-multitouch.c HID: core: Sanitize event code and type when mapping input 2020-09-09 19:04:22 +02:00
hid-nti.c
hid-ntrig.c
hid-ortek.c
hid-penmount.c
hid-petalynx.c
hid-picolcd.h
hid-picolcd_backlight.c
hid-picolcd_cir.c
hid-picolcd_core.c
hid-picolcd_debugfs.c
hid-picolcd_fb.c
hid-picolcd_lcd.c
hid-picolcd_leds.c
hid-pl.c
hid-plantronics.c
hid-primax.c
hid-prodikeys.c
hid-quirks.c HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for all Saitek X52 devices 2020-09-17 13:45:25 +02:00
hid-redragon.c
hid-retrode.c
hid-rmi.c HID: rmi: Check that the RMI_STARTED bit is set before unregistering the RMI transport device 2020-01-04 19:13:00 +01:00
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c
hid-roccat-isku.h
hid-roccat-kone.c HID: roccat: add bounds checking in kone_sysfs_write_settings() 2020-10-29 09:55:09 +01:00
hid-roccat-kone.h
hid-roccat-koneplus.c
hid-roccat-koneplus.h
hid-roccat-konepure.c
hid-roccat-kovaplus.c
hid-roccat-kovaplus.h
hid-roccat-lua.c
hid-roccat-lua.h
hid-roccat-pyra.c
hid-roccat-pyra.h
hid-roccat-ryos.c
hid-roccat-savu.c
hid-roccat-savu.h
hid-roccat.c
hid-saitek.c
hid-samsung.c
hid-sensor-custom.c
hid-sensor-hub.c
hid-sjoy.c
hid-sony.c HID: sony: Fix for broken buttons on DS3 USB dongles 2020-06-07 13:17:53 +02:00
hid-speedlink.c
hid-steam.c HID: steam: fixes race in handling device list. 2020-07-29 10:16:52 +02:00
hid-steelseries.c
hid-sunplus.c
hid-tivo.c
hid-tmff.c
hid-topseed.c
hid-twinhan.c
hid-uclogic.c
hid-udraw-ps3.c
hid-waltop.c
hid-wiimote-core.c
hid-wiimote-debug.c
hid-wiimote-modules.c
hid-wiimote.h
hid-xinmo.c
hid-zpff.c
hid-zydacron.c
hidraw.c HID: hidraw, uhid: Always report EPOLLOUT 2020-01-17 19:46:55 +01:00
Kconfig
Makefile
uhid.c HID: hidraw, uhid: Always report EPOLLOUT 2020-01-17 19:46:55 +01:00
wacom.h
wacom_sys.c HID: wacom: Read HID_DG_CONTACTMAX directly for non-generic devices 2020-05-14 07:57:20 +02:00
wacom_wac.c HID: wacom: Avoid entering wacom_wac_pen_report for pad / battery 2020-11-05 11:08:50 +01:00
wacom_wac.h