android_kernel_motorola_sm6375/drivers/hid
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Grant Likely 039b66468f HID: input: Fix devices that return multiple bytes in battery report
commit 4f57cace81438cc873a96f9f13f08298815c9b51 upstream.

Some devices, particularly the 3DConnexion Spacemouse wireless 3D
controllers, return more than just the battery capacity in the battery
report. The Spacemouse devices return an additional byte with a device
specific field. However, hidinput_query_battery_capacity() only
requests a 2 byte transfer.

When a spacemouse is connected via USB (direct wire, no wireless dongle)
and it returns a 3 byte report instead of the assumed 2 byte battery
report the larger transfer confuses and frightens the USB subsystem
which chooses to ignore the transfer. Then after 2 seconds assume the
device has stopped responding and reset it. This can be reproduced
easily by using a wired connection with a wireless spacemouse. The
Spacemouse will enter a loop of resetting every 2 seconds which can be
observed in dmesg.

This patch solves the problem by increasing the transfer request to 4
bytes instead of 2. The fix isn't particularly elegant, but it is simple
and safe to backport to stable kernels. A further patch will follow to
more elegantly handle battery reports that contain additional data.

Signed-off-by: Grant Likely <[email protected]>
Cc: Darren Hart <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Benjamin Tissoires <[email protected]>
Cc: [email protected]
Tested-by: Darren Hart <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-08-19 08:15:53 +02:00
..
i2c-hid HID: i2c-hid: add Mediacom FlexBook edge13 to descriptor override 2020-07-29 10:18:36 +02:00
intel-ish-hid HID: intel-ish-hid: avoid bogus uninitialized-variable warning 2020-06-24 17:50:23 +02:00
usbhid HID: usbhid: Fix race between usbhid_close() and usbhid_stop() 2020-05-14 07:58:24 +02:00
hid-a4tech.c
hid-accutouch.c
hid-alps.c HID: alps: support devices with report id 2 2020-07-29 10:18:36 +02:00
hid-apple.c HID: apple: Disable Fn-key key-re-mapping on clone keyboards 2020-07-29 10:18:36 +02:00
hid-appleir.c
hid-asus.c HID: asus: Ignore Asus vendor-page usage-code 0xff events 2020-02-01 09:34:41 +00:00
hid-aureal.c
hid-axff.c
hid-belkin.c
hid-betopff.c
hid-bigbenff.c HID: hid-bigbenff: fix race condition for scheduled work during removal 2020-03-21 08:11:49 +01:00
hid-cherry.c
hid-chicony.c
hid-cmedia.c
hid-core.c HID: core: fix off-by-one memset in hid_report_raw_event() 2020-03-05 16:43:42 +01:00
hid-corsair.c
hid-cougar.c
hid-cp2112.c
hid-creative-sb0540.c
hid-cypress.c
hid-debug.c
hid-dr.c
hid-elan.c
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-21 08:11:58 +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: Ignore Simply Automated UPB PIM 2020-07-22 09:33:08 +02:00
hid-input.c HID: input: Fix devices that return multiple bytes in battery report 2020-08-19 08:15:53 +02:00
hid-ite.c HID: ite: Only bind to keyboard USB interface on Acer SW5-012 keyboard dock 2020-03-05 16:43:42 +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: avoid repeated "multiplier = " log messages 2020-07-22 09:33:08 +02:00
hid-macally.c
hid-magicmouse.c HID: magicmouse: do not set up autorepeat 2020-07-22 09:33:08 +02:00
hid-maltron.c
hid-mf.c
hid-microsoft.c
hid-monterey.c
hid-multitouch.c HID: multitouch: enable multi-input as a quirk for some devices 2020-06-07 13:18:47 +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: Ignore Simply Automated UPB PIM 2020-07-22 09:33:08 +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:18:13 +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-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:18:47 +02:00
hid-speedlink.c
hid-steam.c HID: steam: fixes race in handling device list. 2020-07-29 10:18:36 +02:00
hid-steelseries.c
hid-sunplus.c
hid-tivo.c
hid-tmff.c
hid-topseed.c
hid-twinhan.c
hid-u2fzero.c
hid-uclogic-core.c
hid-uclogic-params.c
hid-uclogic-params.h
hid-uclogic-rdesc.c
hid-uclogic-rdesc.h
hid-udraw-ps3.c
hid-viewsonic.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:48:15 +01:00
Kconfig
Makefile
uhid.c HID: hidraw, uhid: Always report EPOLLOUT 2020-01-17 19:48:15 +01:00
wacom.h HID: wacom: generic: Treat serial number and related fields as unsigned 2019-11-06 21:37:29 +01:00
wacom_sys.c HID: wacom: Read HID_DG_CONTACTMAX directly for non-generic devices 2020-05-14 07:58:24 +02:00
wacom_wac.c HID: wacom: Report 2nd-gen Intuos Pro S center button status over BT 2020-05-14 07:58:24 +02:00
wacom_wac.h