On Wed, Apr 1, 2020 at 11:23 PM Gerecke, Jason <killertofu@xxxxxxxxx> wrote: > > From: Jason Gerecke <jason.gerecke@xxxxxxxxx> > > We've recently switched from extracting the value of HID_DG_CONTACTMAX > at a fixed offset (which may not be correct for all tablets) to > injecting the report into the driver for the generic codepath to handle. > Unfortunately, this change was made for *all* tablets, even those which > aren't generic. Because `wacom_wac_report` ignores reports from non- > generic devices, the contact count never gets initialized. Ultimately > this results in the touch device itself failing to probe, and thus the > loss of touch input. > > This commit adds back the fixed-offset extraction for non-generic devices. > > Ref: https://github.com/linuxwacom/input-wacom/issues/155 I think the official tag is "Link", not "Ref". I changed it. > Fixes: 184eccd40389 ("HID: wacom: generic: read HID_DG_CONTACTMAX from any feature report") > Signed-off-by: Jason Gerecke <jason.gerecke@xxxxxxxxx> > Reviewed-by: Aaron Armstrong Skomra <aaron.skomra@xxxxxxxxx> > CC: stable@xxxxxxxxxxxxxxx # 5.3+ > --- I really wish we had regression tests for Wacom devices too. This could have been avoided in the first place. Anyway, applied to for-5.7/upstream-fixes Thanks! Cheers, Benjamin > drivers/hid/wacom_sys.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c > index 5ded94b7bf68..cd71e7133944 100644 > --- a/drivers/hid/wacom_sys.c > +++ b/drivers/hid/wacom_sys.c > @@ -319,9 +319,11 @@ static void wacom_feature_mapping(struct hid_device *hdev, > data[0] = field->report->id; > ret = wacom_get_report(hdev, HID_FEATURE_REPORT, > data, n, WAC_CMD_RETRIES); > - if (ret == n) { > + if (ret == n && features->type == HID_GENERIC) { > ret = hid_report_raw_event(hdev, > HID_FEATURE_REPORT, data, n, 0); > + } else if (ret == 2 && features->type != HID_GENERIC) { > + features->touch_max = data[1]; > } else { > features->touch_max = 16; > hid_warn(hdev, "wacom_feature_mapping: " > -- > 2.26.0 >