| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reply to an out-of-order outgoing BulkTransfer may be also out-of-order
Currently we can get:
found in-order BulkTransfer:Endpoint=0x01,Data=…,Length=0x25 at position 315
found in-order BulkTransfer:Endpoint=0x82,Data=…,Length=0x25 at position 316
…
found out-of-order BulkTransfer:Endpoint=0x01,Data=…,Length=0x25 at position 312
found in-order BulkTransfer:Endpoint=0x82,Data=…,Length=0x25 at position 320
while expecting:
found in-order BulkTransfer:Endpoint=0x01,Data=…,Length=0x25 at position 315
found in-order BulkTransfer:Endpoint=0x82,Data=…,Length=0x25 at position 316
…
found out-of-order BulkTransfer:Endpoint=0x01,Data=…,Length=0x25 at position 312
found in-order BulkTransfer:Endpoint=0x82,Data=…,Length=0x25 at position 314
…
found in-order BulkTransfer:Endpoint=0x01,Data=…,Length=0x25 at position 319
found in-order BulkTransfer:Endpoint=0x82,Data=…,Length=0x25 at position 320
|
|
|
|
|
| |
json library previous to version 1.6.0 doesn't provide the
json_object_get_*_member_with_default() functions.
|
|
|
|
| |
This allows emulating the Google Servo Micro.
|
| |
|
|
|
|
|
|
|
|
|
| |
If we load new emulation data we have to do horrible tricks in the caller to
avoid handling the remove event when loading new event data.
Make the caller (fwupd) much simpler by emitting the correct signals.
Also add a ::device-changed signal that we can use to reload the device events.
|
|
|
|
| |
If the return code is LIBUSB_ERROR_NO_DEVICE we want to record that.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This allows us to see which phase of the emulation should be used.
|
| |
|
|
|
|
|
| |
This is required to emulate devices that just reset (without completing the
current transfer) when asked to reset.
|
|
|
|
|
| |
This will prevent crashes if the caller is casting from a const buffer to a
mutable buffer.
|
|
|
|
|
|
| |
This allows us to simulate an entire context of devices, simulating responses
as if the hardware is connected. This allows building rich device-specific
unit tests in programs like fwupd, without having to have the hardware attached.
|
| |
|
| |
|
|
|
|
| |
There's no point keep asking the device for BOS descriptors when it has none.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This allows us to write tests that mock up entire devices.
|
|
|
|
|
| |
This can speed up device enumeration, and also allows us to emulate the
interfaces or descriptors in the future.
|
| |
|
| |
|
|
|
|
|
| |
This frees up mental energy when reviewing patches and is something I
should have done a long time ago.
|
| |
|
|
|
|
| |
We started using this several months ago and nobody even noticed.
|
| |
|
|
|
|
|
| |
The end year is legally and functionally redundant, and more importantly
causes cherry-pick conflicts when trying to maintain old branches.
|
|
|
|
|
|
|
| |
Some devices won't answer to a request with a 128-byte data buffer, this
allows the user to specify the size of the request data
buffer. g_usb_device_get_string_descriptor_bytes still uses the default
buffer size (128 bytes).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
We used to reference a device during the initable init vfunc, however
it's better to do it when the device is actually set as an object
property.
In this way, the device is always unreffed when the object is disposed,
without having to care about the ordering.
|
|
|
|
|
|
|
|
|
|
|
| |
Currently gusb-device adds two references to an internal libusb device,
causing a memory leak on destruction.
In fact, we add a reference when the device is constructed and when the
device is inited.
To avoid this and ensure that libusb will cleanup all the devices on
context destruction, only reference on device initialization.
|
|
|
|
| |
This is requried for the GD32VF103 device.
|
|
|
|
|
|
|
|
|
|
|
| |
libusb can only handle cancellation if the transfer is already
in-flight. However, g_cancellable_connect will immediately call the
callback and then libusb_cancel_transfer when the cancellable is already
cancelled at the time the transfer is submitted.
Move the cancellation registration to after transfer submission to avoid
ordering issues. Also avoid even submitting the transfer if the
cancellable is already cancelled to begin with.
|
| |
|
|
|
|
|
| |
Adds a getter for a gusb_device to get the string index for the active
configuration's description.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The existing logic here was unsound; the recursion only checked the string for
length 0 after it had gone up the tree to the parent, and so would never match.
This meant if you had identical devices with the same port hierarchy on
different USB busses they had the *same* physical ID. This really upsets
projects like fwupd which use the physical ID to stay the same on device replug
(which worked fine), but also dedupe devices with the same physical ID, which
is what broke here.
|
| |
|
| |
|