Questions about USB, uhid, ukbd and quirks
Hans Petter Selasky
hselasky at c2i.net
Sat Nov 24 13:36:52 UTC 2012
On Saturday 24 November 2012 14:24:07 Niclas Zeising wrote:
> On 11/24/12 14:19, Hans Petter Selasky wrote:
> > On Saturday 24 November 2012 13:54:45 Niclas Zeising wrote:
> >> On 11/24/12 13:23, Niclas Zeising wrote:
> >>> On 11/24/12 13:17, Hans Petter Selasky wrote:
> >>>> On Saturday 24 November 2012 12:13:49 Hans Petter Selasky wrote:
> >>>>> On Saturday 24 November 2012 00:00:44 Niclas Zeising wrote:
> >>>>>> Hi!
> >>>>>> I have a couple of questions about USB.
> >>>>>> I recently bought a new USB keyboard, a Logitech K120. When
> >>>>>> attaching this to a FreeBSD system, however, it is detected as a
> >>>>>> hid device (attaching to uhid) rather than a keyboard (attaching to
> >>>>>> ukbd). The keyboard works fine, but I'm just curious as to why it
> >>>>>> doesn't use ukbd.
> >>>>>
> >>>>>> The output from usbconfig for this keyboard is:
> >>>>> Hi,
> >>>>>
> >>>>> It seems the UHID driver needs to be synced with UMS and UKBD
> >>>>> regarding the
> >>>>> detection logic. Can you try the attached patch and report back.
> >>>>>
> >>>>> --HPS
> >>>>
> >>>> One more thing to check:
> >>>>
> >>>> /etc/devd/usb.conf
> >>>>
> >>>> Is perhaps auto-loading uhid before ukbd, and that might also be part
> >>>> of the
> >>>> issue.
> >>>
> >>> Hi!
> >>> Having ukbd in the kernel, and not uhid, makes uhid load as a module
> >>> during boot and attach to the keyboard, even with your patch. I'm
> >>> recompiling the kernel now with uhid as part of the kernel to see if it
> >>> makes a difference. I'm not too confortable hacking /etc/devd/usb.conf,
> >>> but if you can point me in the right direction I'll have a go at it.
> >>> Regards!
> >>
> >> Having uhid in the kernel did not make a difference, it attached to the
> >> keyboard (or rather, the keyboard attached to the uhid driver, I guess).
> >> Regards!
> >
> > Could you dump the configuration descriptor of your device using
> > usbconfig?
> >
> > usbconfig -d X.Y dump_curr_config_desc
> >
> > --HPS
>
> Attached patch contains the dump. From my reading of the USB spec, it
> seems that this keyboard has two interfaces, one that detects as a
> keyboard, and might be the boot device, and one that's just a regular
> hid. I might also be very wrong in this. :)
> I have a dump from a keyboard that only attaches to ukbd, if you need
> something to compare to. That keyboard, however, believes it's a liteon
> keyboard, rather than a logitech keyboard. That, however, is probably
> Logitech's fault.
> Thank you for helping out!
> Regards!
Hi,
You should have one of each, one ukbd, and one uhid.
If you run "usbconfig show_ifdrv" at what interface is the uhid and ukbd
attached.
Make sure both uhid and ukbd is loaded.
Please add a printout, but is_keyboard should be non-zero, before and after my
patch. So uhid is not attaching to the wrong interface, so to speak.
--HPS
More information about the freebsd-hackers
mailing list