Commit: c272989f0477f7ac794016b057d1b09e8b58f7dc
Parent: 96e45db6dbf1e8594488c582bc377f1a73fe8658
Author: Juha Kuikka <juha.kuikka@synapse.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2016-12-27 15:03:47
Tree: b2cc914f075535b7f34d49487e398aed2446f597

Remove deprecated UHID_FEATURE API I believe I have identified an issue with the HID-over-GATT (HoG) where, through hidraw, the HIDIOCGFEATURE does not work correctly. The symptom is that the ioctl call returns immediately with bogus data, before the Read Request to the peripheral has been completed. I believe the issue is caused by the hog-lib.c registering a handler for both UHID_FEATURE and UHID_GET_REPORT events, which in the uhid header file turn out to be the same enum. This causes the get_report() to get called first, it issues the Read Request and waits for it's completion. After this the get_feature() is immediately called with the same uhid message, which sends the UHID_FEATURE_ANSWER in to the kernel with stale data, which then gets returned to the hidraw caller. I have fixed this by removing the get_feature() as it is unnecessary anyway. See attached patch. I have tested with against both old and new uhid API (kernels 3.8 and 4.4).

Diffstat

M profiles/input/hog-lib.c | 33 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

1 files changed, 0 insertions(+), 33 deletions(-)

View Full Diff | Patch