Age | Commit message (Collapse) | Author | Files | Lines |
|
Based on information for M525 (entitycount == 0), and T650 (BL and HW).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
The input report ID can be 0x10 or 0x11, the responses are always 0x11.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Do not treat IRoot special in hidpp_process_device_hidpp20, but
implement it as a generic feature using hidpp20_feature_call. This
makes it easier to re-use the error reporting stuff.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
|
|
Prepare for adding more HID++ 2.0 features.
|
|
The USB_CFG_ATT_WAKEUP seems to be ignored by the device, perhaps it
gets handled by the OS.
usb_desc_attach is not necessary because we only have one full-speed
configuration. If there would also be a high-speed (or super-speed)
configuration, then usb_desc_attach must be added back to allow picking
an appropriate configuration based on the speed of the controller port
(UHCI, EHCI, XHCI). usb_desc_init() takes care of setting the initial
configuration (there is only one now).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
The XHCI HCD sends an OUT packet which was unexpected by the usbdump
code. That was the case because the core USB code that was normally
calling handle_control only called when the full data was received from
the host (from the Status stage, with PID == USB_TOKEN_IN).
Then there is also the do_parameter function as used by XHCI that was
not really handled. Fix this by allowing OUT tokens, also document
why this is necessary.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Stop hard-coding capture file and introduce the "usbdump" property
to specify the capture file path. When omitted, no capture will be
done.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Stop hard-coding capture file and introduce the "usbdump" property
to specify the capture file path. When omitted, no capture will be
done.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
New Hidpp20Msg type helps reading the HID++ 2.0 function format.
Implemented error responses (undocumented), and IRoot.GetProtocol().
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Reports 0x21 always fails (-EPIPE) for Set_Report.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Undocumented, so it's guesswork based on
https://git.lekensteyn.nl/ltunify/tree/registers.txt
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
The "address" and "value" split for short and long HID++ messages only
make sense for HID++ 1.0 register accesses. For others, use "params".
Also fix a mixup of reporting flags.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
|
|
It is not dangerous to modify the original data buffer, so just pass
a pointer for the message instead. Also implement DJ report type 0x0E
(LEDS).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
The idea of the input queue is probably that wireless devices cannot
immediately be queried, but the receiver is able to respond immediately.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
These serial numbers are obviously fake, the product and device names,
however, are real.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Also enable processing of input reports. Now at least keyboard events
work and the enumeration order is slightly more sane, yay!
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
The length should match our expectations, but let's check that to be
sure.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
WIP (partially untested).
Handle input reports, respond with HID events if there are no queued
output reports. Implemented input report processing for receiver:
0x80 (Switch and Keep-Alive), 0x81 (Get Paired Devices).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Fix error queue name, rename input queue for clarity. Split input
and output queue for further work and NAK when there is no interrupt
data available.
|
|
Error queue is implemented, possible receiver and device properties
are filled in (in the header).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Prepare for adding DJ support, which I expect to be huge and unrelated
to the HID code.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
bNumEndpoints specify the number of endpoints in the endpoint
descriptor. When the mouse endpoint was tried (EP2), it triggered this
assertion because there is only one endpoint for the interface.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Copied from dev-hid.c (order changed to match interfaces order).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
For now, the receiver has always a mouse and keyboard paired.
Set_Idle, Get_Idle, Get_Protocol and Set_Protocol support
interface-specific devices.
Interrupt data for the HID mode are also implemented.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Instead of changing bus.c (next_usb_bus) and possibly breaking
configurations relying on this number, just add one in the dump code
for cosmetic purposes.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
There is still a discrepancy (seen 300 ms and 600 ms), but it is better
than completely a difference equal to the uptime.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
This is verified to reproduce the same capture as done inside the VM.
The differences are in time, bInterval, URB length, URB ID and the
Copy of transfer flags.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
And I was wondering why the interrupt packets in dev-hid.c had a
reversed type marking...
|
|
Non-control transfers have a meaningless setup buffer.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
The "length" field stores the expected size of data. "len_cap" stores
the real length of the data in the current packet (the "captured" data).
Also try to set a slightly more sane length value depending on
submission type, but this is much braindead.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
This allows for less less checking by the consumer and avoids
unnecessary work if the capture cannot be written anyway.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
To make a tidy ship, remove unused parts that were taken from dev-wacom.
Also enable a handle_data callback (currently empty), handle_reset
(currently sets the device mode to HID instead of DJ).
This is incomplete, the handle_data callback must contain something.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
It looks very ugly, perhaps a helper function should moved to desc.c?
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
USB packets are captured in the pcap format using the Linux usbmon
link-layer type. Right now, this only works with handle_ctrl. Data
packets (isochronous, bulk and interrupt) are not (fully)
implemented yet.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
|
|
Based on hw/usb/dev-wacom.c
|
|
If enabled, set the thread name at creation (on GNU systems with
pthread_set_np)
Fix up all the callers with a thread name
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
- xhci improvements and fixes.
- uhci bugfix.
- cleanups.
# gpg: Signature made Tue 18 Feb 2014 15:48:10 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-usb-3:
xhci: use DPRINTF() instead of fprintf(stderr, ...)
xhci: switch debug printf to tracepoint
xhci iso: allow for some latency
xhci iso: fix time calculation
uhci: invalidate queue on device address changes
xhci: fix overflow in usb_xhci_post_load
usb: Remove magic constants from device bmAttributes
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
into staging
QOM infrastructure fixes and device conversions
* QTest cleanups and test cases for PCI NICs
* NAND fix for "info qtree"
* Cleanup and extension of QOM machine tests
* IndustryPack test cases and conversion to QOM realize
* I2C cleanups
* Cleanups of legacy qdev properties
# gpg: Signature made Mon 17 Feb 2014 22:15:37 GMT using RSA key ID 3E7E013F
# gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
# gpg: aka "Andreas Färber <afaerber@suse.com>"
* remotes/afaerber/tags/qom-devices-for-peter: (49 commits)
qtest: Include system headers before user headers
qapi: Refine human printing of sizes
qdev: Use QAPI type names for properties
qdev: Add enum property types to QAPI schema
block: Handle "rechs" and "large" translation options
qdev: Remove hex8/32/64 property types
qdev: Remove most legacy printers
qdev: Use human mode in "info qtree"
qapi: Add human mode to StringOutputVisitor
qdev: Inline qdev_prop_parse()
qdev: Legacy properties are just strings
qdev: Legacy properties are now read-only
qdev: Remove legacy parsers for hex8/32/64
qdev: Sizes are now parsed by StringInputVisitor
qapi: Add size parser to StringInputVisitor
qtest: Don't segfault with invalid -qtest option
ipack: Move IndustryPack out of hw/char/
ipoctal232: QOM parent field cleanup
ipack: QOM parent field cleanup for IPackDevice
ipack: QOM parent field cleanup for IPackBus
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
So we don't spam stderr with (guest-triggerable) messages by default.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|