usbd.conf: detach ukbd
Norbert Koch
NKoch at demig.de
Mon Jun 13 08:32:57 GMT 2005
> > 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ukbd.c.patch
Type: application/octet-stream
Size: 744 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20050613/c1d82840/ukbd.c.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb.c.patch
Type: application/octet-stream
Size: 422 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20050613/c1d82840/usb.c.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb.h.patch
Type: application/octet-stream
Size: 356 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20050613/c1d82840/usb.h.obj
More information about the freebsd-hackers
mailing list