> > Else if devd is not available on 4.11 you will have to change > > some code and > > compile a new kernel, from what I can see. > > > > To the file /sys/dev/usb/ukbd.c add this: > > > > static void > > usbd_add_device_detach_event(device_t self) > > { > > struct usb_event ue; > > > > bzero(&ue, sizeof(ue)); > > > > strlcpy(ue.u.ue_device.udi_devnames[0], > > device_get_nameunit(self), USB_MAX_DEVNAMELEN) ; > > > > usb_add_event(USB_EVENT_DEVICE_DETACH, &ue); > > return; > > } > > > > ukbd_detach() > > { > > ... > > usbd_add_device_detach_event(self); > > return (0); > > } > > > > This will make the suggestion from Maksim work.
Ok, that seems to work with a minor change [no strlcpy] and two additional patches in usb.h & usb.c. Usbd gets a detach event "ukbd0" and another event from its fallthrough device. Thank you once again. If someone is interested in the patch files against 4.11 see the attachment. Norbert
ukbd.c.patch
Description: Binary data
usb.c.patch
Description: Binary data
usb.h.patch
Description: Binary data
_______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"