[BUG + PATCH] HID ELAN9038 probe fails with "report is too long"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i posted this bug to bugzilla with the attached patch.
this email is to notify the maintainers.
https://bugzilla.kernel.org/show_bug.cgi?id=206259

thanks!

js
----

ELAN i2c digitizer on microsoft surface go fails to initialize and
device is non-functional

initialization fails on 4.19.96:
----
[    5.507245] hid-generic 0018:04F3:261A.0005: report is too long
[    5.507256] hid-generic 0018:04F3:261A.0005: item 0 1 0 8 parsing failed
[    5.507290] hid-generic: probe of 0018:04F3:261A.0005 failed with error -22
[    5.556409] hid-multitouch 0018:04F3:261A.0005: report is too long
[    5.581641] hid-multitouch 0018:04F3:261A.0005: item 0 1 0 8 parsing failed
[    5.618495] hid-multitouch: probe of 0018:04F3:261A.0005 failed
with error -22

initialization succeeds on 4.19.95:
----
[    7.150887] hid-generic 0018:04F3:261A.0001: input,hidraw2: I2C HID
v1.00 Device [ELAN9038:00 04F3:261A] on i2c-ELAN9038:00
[    8.253077] input: ELAN9038:00 04F3:261A as
/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ELAN9038:00/0018:04F3:261A.0001/input/input20
[    8.253219] input: ELAN9038:00 04F3:261A Pen as
/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ELAN9038:00/0018:04F3:261A.0001/input/input23
[    8.253330] hid-multitouch 0018:04F3:261A.0001: input,hidraw0: I2C
HID v1.00 Device [ELAN9038:00 04F3:261A] on i2c-ELAN9038:00

problem seems to be due to this commit:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.19.y&id=31d06cc8e7caec36bedeb4f90444920431462f61
diff -rupN linux-4.19.97/drivers/hid/hid-core.c linux-4.19.97-1/drivers/hid/hid-core.c
--- linux-4.19.97/drivers/hid/hid-core.c	2020-01-17 18:47:17.000000000 +0000
+++ linux-4.19.97-1/drivers/hid/hid-core.c	2020-01-19 16:31:31.823005977 +0000
@@ -290,8 +290,11 @@ static int hid_add_field(struct hid_pars
 
 	/* Total size check: Allow for possible report index byte */
 	if (report->size > (HID_MAX_BUFFER_SIZE - 1) << 3) {
-		hid_err(parser->device, "report is too long\n");
-		return -1;
+		hid_err(parser->device,
+				"report is too long: %d > %d\n",
+				report->size,
+				(HID_MAX_BUFFER_SIZE - 1) << 3);
+		return 0;
 	}
 
 	if (!parser->local.usage_index) /* Ignore padding fields */

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux