History log of /openbsd-src/sys/dev/usb/uhidev.c (Results 1 – 25 of 109)
Revision Date Author Comments
# 81508fe3 23-May-2024 jsg <jsg@openbsd.org>

remove unneeded includes; ok mpi@


# cdf25420 12-Aug-2023 miod <miod@openbsd.org>

Better uwacom(4) support for Intuos S and One S tablets; most of the work
done by Vladimir Meshcheriakov (first name dot last name at epita somewhere in
frogland), thanks!

Tested by Peter J. Philipp

Better uwacom(4) support for Intuos S and One S tablets; most of the work
done by Vladimir Meshcheriakov (first name dot last name at epita somewhere in
frogland), thanks!

Tested by Peter J. Philipp on Intuos Draw and by espie@ on Intuos S.

show more ...


# fdc486ed 20-May-2022 anton <anton@openbsd.org>

Rename hid_none to hid_all as it represents all possible hid kinds by
now.


# 627096b6 21-Mar-2022 thfr <thfr@openbsd.org>

Add support for XBox One gamecontroller, including report descriptor.
Based on previous XBox 360 controller code and NetBSD's implementation.

Tested by me and solene@.
Input by solene@ and stsp@.
ok

Add support for XBox One gamecontroller, including report descriptor.
Based on previous XBox 360 controller code and NetBSD's implementation.

Tested by me and solene@.
Input by solene@ and stsp@.
ok stsp@ phessler@
ok solene@ for an earlier version.

show more ...


# e0050fab 03-Dec-2021 anton <anton@openbsd.org>

Bring back the recently reverted change, this time without the inverted
conditional. Repeating the previous commit messsage:

Assert that at least one report id is claimed during multiple report ids

Bring back the recently reverted change, this time without the inverted
conditional. Repeating the previous commit messsage:

Assert that at least one report id is claimed during multiple report ids
attachment. Should prevent uhidev drivers from doing the wrong thing in their
corresponding match routine.

Tested by dv@

show more ...


# cf8183f3 25-Nov-2021 anton <anton@openbsd.org>

revert recent change, breakage reported by dv@


# 2b3e5a55 25-Nov-2021 anton <anton@openbsd.org>

Assert that at least one report id is claimed during multiple report ids
attachment. Should prevent uhidev drivers from doing the wrong thing in their
corresponding match routine.


# 3286dae3 22-Nov-2021 anton <anton@openbsd.org>

Drop the old problematic claim multiple report ids logic now that all
uhidev drivers have been fixed.


# d3bc19d9 22-Nov-2021 jsg <jsg@openbsd.org>

avoid clang -Wsometimes-uninitialized warning with SMALL_KERNEL


# 5331a82c 17-Nov-2021 anton <anton@openbsd.org>

Fix a double free in uhidev_close() caused by a race between
uhidev_open() and uhidev_close(). In uhidev_close() the UHIDEV_OPEN flag
is cleared early on but the same thread can end up sleeping while

Fix a double free in uhidev_close() caused by a race between
uhidev_open() and uhidev_close(). In uhidev_close() the UHIDEV_OPEN flag
is cleared early on but the same thread can end up sleeping while
closing the input or output pipe. This allows another thread to enter
uhidev_open() but only to fail opening either the input or output pipe
since they are already open for exclusive use. The uhidev_open() error
path frees the input buffer but leaves a dangling pointer around;
causing uhidev_close() to free the same buffer.

This can at least happen on xhci(4) which can end up sleeping in
xhci_pipe_close().

Reported by and ok gnezdo@

show more ...


# faac88c0 15-Nov-2021 anton <anton@openbsd.org>

In preparation for once again trying the resolve the claim multiple
report ids conflict, extract the claim multiple report ids conditional
in order to minimize the required upcoming changes to resolv

In preparation for once again trying the resolve the claim multiple
report ids conflict, extract the claim multiple report ids conditional
in order to minimize the required upcoming changes to resolve the
conflict.

Tested by gnezdo@

show more ...


# 919cc5e9 11-Nov-2021 anton <anton@openbsd.org>

Here we go again, revert the second attempt to resolve the
UHIDEV_CLAIM_MULTIPLE_REPORTID conflict.

Breaks fido(4) as reported by gnezdo@


# ed0cd979 10-Nov-2021 anton <anton@openbsd.org>

Second attempt to resolve UHIDEV_CLAIM_MULTIPLE_REPORTID conflict, this
time without using sentinel that cannot be represented using a single
byte. Instead, use 0 as this report ID is reserved accord

Second attempt to resolve UHIDEV_CLAIM_MULTIPLE_REPORTID conflict, this
time without using sentinel that cannot be represented using a single
byte. Instead, use 0 as this report ID is reserved according to the USB
HID specification. Fixes attachment of some upd devices which exposes up
to 256 report IDs.

Thanks to Damien Couderc <openbsd at petrocore dot eu> for reporting and
testing.

show more ...


# b21bb9a8 09-Nov-2021 anton <anton@openbsd.org>

The uhidevsubmatch() routine was imported from NetBSD back in 2002 along with
the reportid locator. The same locator was removed in 2004 making the routine
redundant.

ok gnezdo@ mpi@


# a49bda3d 08-Nov-2021 anton <anton@openbsd.org>

Plug uhidev memory leak during detach.

Thanks to Damien Couderc <openbsd at petrocore dot eu> for testing and ok
gnezdo@


# 6cdbbe9b 12-Sep-2021 anton <anton@openbsd.org>

Revert recent uhidev report size changes. It's reported to break fido devices
for as of now unknown reasons.


# adb06565 10-Sep-2021 anton <anton@openbsd.org>

Instead of letting uhidev drivers get the report sizes, do it once in
uhidev and pass the same sizes as part of the attach arguments. Makes
the uhidev drivers a bit less repetitive.

It might look te

Instead of letting uhidev drivers get the report sizes, do it once in
uhidev and pass the same sizes as part of the attach arguments. Makes
the uhidev drivers a bit less repetitive.

It might look tempting to let uhidev assign the sizes after a driver has
attached, removing the need to repeat this logic in each driver. This
does however not work since the input size must be known while calling
uhidev_open() in order to open the interrupt pipe; and uhidev_open() is
called from several attach routines.

Note that this change only works and applies to when attaching to a
single report ID.

ok jcs@

show more ...


# 9d1e72ff 10-Sep-2021 anton <anton@openbsd.org>

Remove unused repsizes array.

ok jcs@ as part of a larger diff


# 59a500d9 18-Mar-2021 anton <anton@openbsd.org>

In revision 1.91 of uhidev.c, jcs@ made sure to only detach devices
claiming multiple report ids once. This allows uhidpp to piggy back on
the same functionality making uhidev_unset_report_dev() redu

In revision 1.91 of uhidev.c, jcs@ made sure to only detach devices
claiming multiple report ids once. This allows uhidpp to piggy back on
the same functionality making uhidev_unset_report_dev() redundant.

show more ...


# b81f7bc8 17-Mar-2021 jcs <jcs@openbsd.org>

When devices have claimed multiple report ids, only detach and send
DVACT_DEACTIVATE to them once when walking sc_subdevs.

Fixes a regression reported and tested by Edd Barrett.

Input from and prev

When devices have claimed multiple report ids, only detach and send
DVACT_DEACTIVATE to them once when walking sc_subdevs.

Fixes a regression reported and tested by Edd Barrett.

Input from and previous version ok anton.

show more ...


# f31b43ce 08-Mar-2021 jcs <jcs@openbsd.org>

Allow uhidev child devices to claim selective report ids

There may be multiple matching devices on a single uhidev device but
the first device that responds to UHIDEV_CLAIM_ALLREPORTID will
block th

Allow uhidev child devices to claim selective report ids

There may be multiple matching devices on a single uhidev device but
the first device that responds to UHIDEV_CLAIM_ALLREPORTID will
block the others from attaching.

Change this to UHIDEV_CLAIM_MULTIPLE_REPORTID and require any
devices wanting some/all report ids to fill in the claimed array in
uhidev_attach_arg with just the reports it needs. uhidev can then
run match routines for other drivers with the available report ids.

ok anton

show more ...


# 65f50905 15-Feb-2021 mglocker <mglocker@openbsd.org>

Back-out USB data toggle fix for HID devices, since we received multiple
reports about broken devices, e.g. for ukbd(4) and fido(4).

ok mpi@


# 6a552525 11-Feb-2021 anton <anton@openbsd.org>

Add uhidev_unset_report_dev(), doing the opposite of
uhidev_set_report_dev(). Needed by some upcoming changes to uhidpp.

ok mglocker@


# fb8863cf 11-Feb-2021 anton <anton@openbsd.org>

If uhidev_set_report_dev() already have been invoked for the given
report id, there's no point in trying to find a matching sub device.

ok mglocker@


# e013a115 04-Feb-2021 anton <anton@openbsd.org>

Add uhidev_set_report_dev() allowing usb drivers to early on install a
handler for a specific report id. Needed by an upcoming driver in order
to communicate with the device already in the attach rou

Add uhidev_set_report_dev() allowing usb drivers to early on install a
handler for a specific report id. Needed by an upcoming driver in order
to communicate with the device already in the attach routine.

ok mglocker@ as part of a larger diff

show more ...


12345