Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: CVS commit: src/sys/dev
Martin Husemann writes:
> On Tue, Mar 03, 2020 at 03:26:47PM +1100, matthew green wrote:
> > without really understanding, it seems that there should be
> > a uhid ioctl to enable this mode, and then your userland code
> > sets it, instead of this hack.
>
> Or make uhid not attach at all on FIDO devices and instead use ugen from
> userland?
no... see below.
> Or solve the long standing "every usb devices should be able to eject
> its driver and be used as ugen instead" problem, see also the various
> JTAG devices showing up as dual uftdi and you need to override in your
> kernel config like:
>
> # GuruPlug JTAG debug interface
> ugenif* at uhub? vendor 0x9e88 product 0x9e8f interface 0 flags 1
yes.. this. but not for this device :-)
> Most devices go via uhid to make userland access easy on windows, but for us
> it makes no real difference.
in this instance, i would rather not use ugen since it's such
a very simple API need. ugen == generic access, and it's hard
with our system to protect against that. usb device numbers
are volatile, so you can't simply trust chmod in /dev.
uhid is a fairly isolated interface, and i think it's right to
use a real driver here than ugen:
crw------- 1 root wheel 64, 0 Feb 27 09:08 /dev/ugen0.00
crw-rw-rw- 1 root wheel 56, 0 Feb 27 09:08 /dev/uhid0
ie, your method would require being root or opening up all
the usb devices...
.mrg.
Home |
Main Index |
Thread Index |
Old Index