In r337289 the touchscreen stop working properly. The model of the
touchscreen that stopped working was a Raydium Corporation Raydium Touch System.
Differential D16772
Fixing a broken touchscreen controller • hselasky on Aug 17 2018, 3:16 PM. Authored by Tags None Referenced Files
Details In r337289 the touchscreen stop working properly. The model of the touchscreen that stopped working was a Raydium Corporation Raydium Touch System.
Diff Detail
Event TimelineComment Actions A partial revert of the r337289. I am not sure why the change made the driver to stop working. Comment Actions Roberto, can you plug the failing device w/o your patch, setting: sysctl hw.usb.wmt.debug=16 It will help @wulf debug this issue. Thank you! Comment Actions hid_report_size() should not be used unconditionally here as it calculates total size of all input reports rather than size of one given report. I guess that something wrong with HID descriptor Roberto, can you provide some info?
on attach failure /dev/input/event node is not created an you can see something like wmt0 on uhub0 wmt0: <ELAN Touchscreen, class 0/0, rev 2.00/0.10, addr 2> on usbus0 wmt0: 10 contacts and [WH]. Report range [0:0] - [3776:2112] device_attach: wmt0 attach returned 6 <------ Attach error message!!!!
a. compile wmt with USB_DEBUG option set wmt_intr_callback: sc=0xfffff80110ed6000 actlen=116 wmt_process_report: nconts = 1 TIP WDTH HGHT X Y C_ID TL_X TL_Y wmt_process_report: cont0: data = 0001 0006 0006 00fd 02d3 0004 00fd 02d3 slot = 0 Comment Actions To make things easier I attached the patch that does p.3. and p.4. --- sys/dev/usb/input/wmt.c +++ sys/dev/usb/input/wmt.c @@ -809,6 +809,9 @@ wmt_hid_parse(struct wmt_softc *sc, const void *d_ptr, uint16_t d_len) } sc->isize = wmt_hid_report_size(d_ptr, d_len, hid_input, report_id); + device_printf(sc->dev, "Report %hhu size: %d\n", report_id, sc->isize); + sc->isize = hid_report_size(d_ptr, d_len, hid_input, NULL); + device_printf(sc->dev, "Maximum input size: %d\n", sc->isize); sc->cont_max_rlen = wmt_hid_report_size(d_ptr, d_len, hid_feature, cont_max_rid); if (thqa_cert_rid > 0) It effectively reverts r337289 and adds required debugging printfs so your attach messge will shown like this: wmt0 on uhub0 wmt0: <ELAN Touchscreen, class 0/0, rev 2.00/0.10, addr 2> on usbus0 wmt0: Report 1 size: 116 wmt0: Maximum input size: 116 wmt0: 10 contacts and [WH]. Report range [0:0] - [3776:2112] HID descriptor an actual report length is still needed Comment Actions I don't see this. What I see is wmt0: 10 contacts and []. Report range [0:0] - [1920:1080]
I don't see this error message.
I have applied the patch and the output of dmesg, evemu-record and usbhid-dump are attached. Comment Actions Please, test this patch on top of unmodified wmt.c: --- sys/dev/usb/input/wmt.c +++ sys/dev/usb/input/wmt.c @@ -521,7 +521,7 @@ wmt_intr_callback(struct usb_xfer *xfer, usb_error_t error) case USB_ST_SETUP: tr_setup: - usbd_xfer_set_frame_len(xfer, 0, sc->isize); + usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); usbd_transfer_submit(xfer); break; default: |