| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
reports about broken devices, e.g. for ukbd(4) and fido(4).
ok mpi@
|
|
|
|
|
|
| |
uhidev_set_report_dev(). Needed by some upcoming changes to uhidpp.
ok mglocker@
|
|
|
|
|
|
| |
report id, there's no point in trying to find a matching sub device.
ok mglocker@
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
partly from Alessandro Ricci
|
|
|
|
|
|
|
|
|
|
| |
on xhci(4) controllers by clearing the interface endpoints before opening
the pipes.
Tested by Mikolaj Kucharski for ugen(4) and gnezdo@ for uhidev(4), plus
myself for both.
ok mpi@
|
|
|
|
|
|
|
| |
Logitech keyboard for unknown reasons.
Reported by denis@
ok djm@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as needed on xhci(4) machines. On non-xhci(4) we save and restore the
toggle bit on close/open of a pipe. With xhci(4) this does not seem to
be possible, at least I haven't yet found it. This means that on those
machines with xhci(4), after a pipe close/open, the device will use the
previous state, while xhci(4)'s state is reset to default. By issuing
a clear endpoint stall we reset the device's toggle bit. Now every
time a /dev/uhid is (re-)opened the state should be synchronized.
Discussed with damien@, mpi@ and Pedro Marteletto
ok markus@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
today. This doesn't seem to be right, since SET_IDLE limits the
reporting frequency for interrupt IN endpoints, normally only required
on keyboard and mouse-like input devices. We noticed recently that
other device types, like e.g. the Cyrus soundKey uaudio(4), will stall
after the SET_IDLE request has been issued.
Therefore we move the SET_IDLE request only to the uhidev(4) child
drivers which seem to require this request. Those we have identified
to be; ukbd(4), ums(4), umstc(4), umt(4), utpms(4), and uwacom(4).
Suggested and ok mpi@
|
|
|
|
|
|
|
|
|
|
| |
before usbd_close_pipe(), since usbd_close_pipe() already takes care
about aborting non-empty pipes.
As investigated by gerhard@ usbdi.c rev. 1.57 did add usbd_abort_pipe()
to usbd_close_pipe(), but the drivers didn't get cleaned up afterwards.
ok gerhard@
|
|
|
|
| |
ok mpi@
|
|
|
|
|
|
|
| |
Close pipes before freeing transfers, otherwise accessing elements in
pipe->queue, like in usbd_abort_pipe(), will result in a crash.
Problem reported by reyk@, ok visa@
|
|
|
|
|
|
|
|
| |
tiny devices don't accept reports using control transfers since
they think that offering the interrupt pipe is enough.
Discussed with djm@
ok mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into hidmt.
The HID code uses hid_feature, hid_input, and hid_output constants
to refer to report types internally that then need to be converted
to their bus-level counterparts before actually getting sent out (so
hid_feature becomes UHID_FEATURE_REPORT for USB,
I2C_HID_REPORT_TYPE_FEATURE for i2c).
This conversion was hard-coded in ihidev but ihidev_[gs]et_report
should assume the type passed is already an i2c-level define, not a
hid one. This is how uhidev does it.
Add a conversion routine callback that any hidmt callers need to set
so that hidmt can convert hid constants to the bus-level versions.
Also add a similar conversion function to uhidev.
ok deraadt
|
|
|
|
|
| |
Errors will result in nice clean panic messages so we know what's wrong.
Reviewed by dhill visa natano jsg.
|
|
|
|
|
| |
Should prevent a race triggering a use-after-free reported by
martijn@ on bugs@
|
| |
|
|
|
|
|
|
|
|
|
| |
These files aren't USB-specific and were used by the previous
Bluetooth implementation, and will be used by the upcoming
HID-over-i2C implementation
ok deraadt
previous version ok kettenis and mpi
|
|
|
|
| |
Tested by jeremy@
|
| |
|
|
|
|
|
|
|
| |
in the report functions instead of letting the stack do it magically for
us.
Reviewed and tested by David Higgs, thanks!
|
| |
|
|
|
|
|
|
|
| |
with some tweaks.
Nothing use it for the moment, but upcoming upd(4) improvements need
it.
|
|
|
|
| |
ok tedu@ deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Always pass the parent uhidev(4) descriptor corresponding to the single
USB device with multiple reportIDs instead of a child.
Make uhidev_get_report() aware of non NUL reportID by prepending a byte
to the given buffer, just like uhidev_set_report{,async}() already do.
Return the number of bytes written or read upon success and -1 otherwise.
This allow callers to deal with short reads without having do mess with
xfer error codes madness.
Reviewed and tested by David Higgs.
|
|
|
|
|
|
|
|
|
|
| |
an uhidev(4) on OpenBSD and there is not point in rerolling your own
reportID handling. Simply use uhidev_*_report().
This is a first step towards better error handling required to deal
with broken upd(4) firmwares.
Tested by David Higgs.
|
| |
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
| |
descriptor.
Pointed out by benno@
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
and a infaceno argument instead of an iface pointer. While here,
remove some unused functions and inlined usbd_read_report_desc since
it is used only once.
This is part of plumbing required to convert the various USB HID devices
to handle multiples report IDs.
ok andre@
|
|
|
|
|
|
|
|
| |
instead of using the default, per-driver, one. This is a step to move
away from the 1 report ID <-> 1 driver design which is no longer true
since the addition of upd(4).
ok andre@
|
|
|
|
|
|
|
| |
report IDs, on those cases some positions on sc_subdevs[] can be null.
Initial analysis by guenther@.
ok mpi@
|
|
|
|
|
|
|
| |
a device. This should be removed once all the drivers attaching to
uhidev(4) are converted.
ok andre@, sthen@
|
|
|
|
|
|
|
| |
own function and don't leave the driver half-configured if a children
doesn't set the interrupt function.
tested by jeremy@, ok andre@
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
drivers attaching to uhidev(4) do not always do it. Seems to fix one of
the transfer aborting races triggering a lot of "ehci_idone: ..." vomit
upon resume.
Reported by and fix tested by Ville Valkonen, ok deraadt@
|
|
|
|
|
|
| |
Allows us to move forward on cleaning.
Okay mpi@
|
|
|
|
|
|
|
|
| |
Leave the deactivate bits to the parent.
Simplify by making a single dying check in uhidev(4) interrupt routine
instead of having each child doing it.
Okay mpi@
|
| |
|
|
|
|
|
|
|
| |
to the report request, use malloc(9) with the appropriate size like
it is done in the synchronous version.
ok miod@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the standard interface class and doesn't have a report descriptor, so
use a manually created one.
The controller shows up as multiple devices with different interface
numbers, so only match the first one as a uhid. The controller shows up
as both a uhid and a ugen.
Rename ugraphire_rdesc.h to uhid_rdesc.h and add the manually created
Xbox 360 report descriptor to the file.
Add ifndef SMALL_KERNEL around the related blocks for the XBox 360
controller and Wacom Graphire, so this should actually shrink the
ramdisks.
Manual report descriptor taken from a 2005 FreeBSD commit. Much help
from mpi@ for getting this suitable for commit to OpenBSD.
OK mpi@
|
|
|
|
|
|
|
|
|
|
|
| |
Get rid of the badly named usbd_bulk_transfer() and usbd_intr_transfer()
they were two identical wrappers to submit a synchronous transfer.
Now all synchronous transfers are submited using usbd_setup_xfer(9) and
usbd_transfer(9) explicitly using the USBD_CATCH flag when signals must
be checked.
Previous version ok'd by mglocker@, with subtle inputs from miod@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
USB transfer reported an I/O error.
This is more likely to have no effect apart generating more
errors because when this happens, the device is generally
already physically detached but the *detach() task has not
run yet. So simply return and wait for the device to be
removed like ucom(4) does.
Partially fix an issue reported by RD Thrush rt at thrush.com.
ok miod@
|
|
|
|
|
|
|
|
|
|
| |
not implement an *activate() function. This could receive more love
but is good enough for the moment to start cleaning useless *activate()
functions.
While here remove unused sc_dying argument.
Tested by and ok mglocker@
|
|
|
|
|
|
|
|
|
| |
definitions instead. We don't change usb.h for now to stay compatible
with userland.
Tested by mpi@ on macppc and myself on i386.
ok mpi@
|
|
|
|
|
|
|
|
| |
that's ever used it, and it's long since been changed to use
DVACT_{QUIESCE,SUSPEND,RESUME} instead.
ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it
up a few weeks ago
|
|
|
|
|
|
| |
them from userland, and nothing in the kernel uses them.
ok krw@, miod@
|
|
|
|
|
|
| |
The dying flag will be set in activate()/DEACTIVATE.
ok deraadt@
|