| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
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@
|
| |
|
|
|
|
| |
for sub-devices, return the last error return value instead of |'ing the
failures together and creating some value that is non-0 (bravo!) but
potentially loses the specific error value...
|
| |
|
|
|
|
|
| |
USB_SET_REPORT ioctls in ukbd and ums.
This allows usbhidctl to be used on these devices e.g. to dump the report
descriptor of troublesome models.
ok deraadt@
|
| | |
|
| |
|
|
|
|
| |
This is needed for the addition of further suspend/resume actions.
Okay deraadt@, marco@.
|
| |
|
|
|
|
| |
From Dave Huang via NetBSD rev 1.18.
ok miod@ deraadt@
|
| |
|
|
|
| |
report id and the data to report is too long (this should probably
use dynamic allocation for large reports).
|
| |
|
|
|
|
|
|
|
| |
Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.
OK deraadt@
|
| |
|
|
|
|
|
|
|
| |
- the wskbd/wsmouse is not phantom, but actually is pre-paired keyboard/mice
talking wskbd/wsmouse to the os
this permits the bluetooth device to attach as wskbd/wsmouse using bluetooth
keyboards for ddb> and in general if you have paired them in an os that
supports flipping the funny bluetooth device into full bluetooth mode
ok drahn@
|
| | |
|
| |
|
|
|
|
| |
so that it shows up before the :. as a result, all the usb devices do not
need to have name printing code anymore. all this now works and prints
nicely because usbd_probe_and_attach() is serialized. ok kettenis
|