diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-11-06 15:42:44 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-11-15 10:56:14 +0100 |
commit | e0b4edbdcc3558d3f38af8398f995c2e9f019f07 (patch) | |
tree | ea91a5fcfb9b6a66a8c0b74cf68ff8d450ce17e0 /freebsd/sys/dev/usb | |
parent | Disable or make static kern_* functions (diff) | |
download | rtems-libbsd-e0b4edbdcc3558d3f38af8398f995c2e9f019f07.tar.bz2 |
Update to FreeBSD head 2018-11-15
Git mirror commit a18b0830c4be01b39489a891b63d6023ada6358a.
Update #3472.
Diffstat (limited to 'freebsd/sys/dev/usb')
-rw-r--r-- | freebsd/sys/dev/usb/controller/dwc_otg.c | 13 | ||||
-rw-r--r-- | freebsd/sys/dev/usb/input/uhid.c | 21 | ||||
-rw-r--r-- | freebsd/sys/dev/usb/input/ukbd.c | 2 |
3 files changed, 35 insertions, 1 deletions
diff --git a/freebsd/sys/dev/usb/controller/dwc_otg.c b/freebsd/sys/dev/usb/controller/dwc_otg.c index 1332b485..005c7ece 100644 --- a/freebsd/sys/dev/usb/controller/dwc_otg.c +++ b/freebsd/sys/dev/usb/controller/dwc_otg.c @@ -1434,6 +1434,19 @@ dwc_otg_host_data_rx(struct dwc_otg_softc *sc, struct dwc_otg_td *td) goto receive_pkt; } } else if (td->ep_type == UE_ISOCHRONOUS) { + if (td->hcsplt != 0) { + /* + * Sometimes the complete + * split packet may be queued + * too early and the + * transaction translator will + * return a NAK. Ignore + * this message and retry the + * complete split instead. + */ + DPRINTF("Retrying complete split\n"); + goto receive_pkt; + } goto complete; } td->did_nak = 1; diff --git a/freebsd/sys/dev/usb/input/uhid.c b/freebsd/sys/dev/usb/input/uhid.c index 90761ab7..8570f676 100644 --- a/freebsd/sys/dev/usb/input/uhid.c +++ b/freebsd/sys/dev/usb/input/uhid.c @@ -677,6 +677,8 @@ uhid_probe(device_t dev) { struct usb_attach_arg *uaa = device_get_ivars(dev); int error; + void *buf; + uint16_t len; DPRINTFN(11, "\n"); @@ -703,6 +705,25 @@ uhid_probe(device_t dev) !usb_test_quirk(uaa, UQ_UMS_IGNORE)))) return (ENXIO); + /* Check for mandatory multitouch usages to give wmt(4) a chance */ + if (!usb_test_quirk(uaa, UQ_WMT_IGNORE)) { + error = usbd_req_get_hid_desc(uaa->device, NULL, + &buf, &len, M_USBDEV, uaa->info.bIfaceIndex); + /* Let HID decscriptor-less devices to be handled at attach */ + if (!error) { + if (hid_locate(buf, len, + HID_USAGE2(HUP_DIGITIZERS, HUD_CONTACT_MAX), + hid_feature, 0, NULL, NULL, NULL) && + hid_locate(buf, len, + HID_USAGE2(HUP_DIGITIZERS, HUD_CONTACTID), + hid_input, 0, NULL, NULL, NULL)) { + free(buf, M_USBDEV); + return (ENXIO); + } + free(buf, M_USBDEV); + } + } + return (BUS_PROBE_GENERIC); } diff --git a/freebsd/sys/dev/usb/input/ukbd.c b/freebsd/sys/dev/usb/input/ukbd.c index 8fb450bc..770d1d3f 100644 --- a/freebsd/sys/dev/usb/input/ukbd.c +++ b/freebsd/sys/dev/usb/input/ukbd.c @@ -1363,7 +1363,7 @@ ukbd_attach(device_t dev) if (sc->sc_flags & UKBD_FLAG_SCROLLLOCK) evdev_support_led(evdev, LED_SCROLLL); - if (evdev_register(evdev)) + if (evdev_register_mtx(evdev, &Giant)) evdev_free(evdev); else sc->sc_evdev = evdev; |