summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix BulkTransfer out-of-order replyHEADmainFrédéric Danis2023-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | | 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
* Add json_object_get_*_member_with_default() helpersFrédéric Danis2023-04-268-40/+55
| | | | | json library previous to version 1.6.0 doesn't provide the json_object_get_*_member_with_default() functions.
* trivial: post release version bumpRichard Hughes2023-02-082-4/+4
|
* Release version 0.4.50.4.5Richard Hughes2023-02-082-0/+28
|
* trivial: Fix critical warning when emulating devicesRichard Hughes2023-02-061-2/+4
|
* Store the config-index as a GUsbDeviceEventRichard Hughes2023-02-061-3/+24
| | | | This allows emulating the Google Servo Micro.
* trivial: Fix critical warning when unloading an emulated deviceRichard Hughes2023-02-031-1/+2
|
* Record zero-sized device eventsRichard Hughes2023-02-031-1/+0
| | | | These are used for DFU reset operations.
* Reset the in-order event index when clearing the event arrayRichard Hughes2023-02-031-0/+1
|
* Do not emit spurious ::device-removed events when emulatingRichard Hughes2023-02-035-27/+200
| | | | | | | | | 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.
* Save the libusb error if libusb_submit_transfer() failsRichard Hughes2023-02-016-10/+80
| | | | If the return code is LIBUSB_ERROR_NO_DEVICE we want to record that.
* trivial: Add some debugging when resetting the event indexRichard Hughes2023-02-011-1/+4
|
* Add g_usb_device_get_created() to better detect emulated replugRichard Hughes2023-02-013-0/+45
|
* trivial: post release version bumpRichard Hughes2023-01-303-7/+6
|
* Release version 0.4.40.4.4Richard Hughes2023-01-302-0/+26
|
* Reduce the debugging level when emulating firmwareRichard Hughes2023-01-275-4/+20
|
* trivial: Export the gusb-device-event.h headerRichard Hughes2023-01-261-0/+1
|
* Add g_usb_device_clear_events() for future useRichard Hughes2023-01-253-0/+19
|
* Emit remove devices with matching tags when loading contextsRichard Hughes2023-01-241-3/+12
| | | | | If a program, say fwupd, has references to existing devices it is probably not expected for the physical backing device to just vanish.
* Add g_usb_device_get_tags() for future useRichard Hughes2023-01-243-0/+21
|
* Add g_usb_device_is_emulated() for future useRichard Hughes2023-01-243-0/+20
|
* Add g_usb_device_remove_tag() for future useRichard Hughes2023-01-234-0/+41
|
* trivial: Fix -Wdeclaration-after-statementRichard Hughes2023-01-231-3/+2
|
* Save removed devices in JSON dump only when requestedFrédéric Danis2023-01-192-4/+7
| | | | | Removed devices should not be saved when trying dump events per update phase.
* Load GUsb endpoints when loading interfaceFrédéric Danis2023-01-191-0/+15
|
* Fix _g_usb_interface_save without endpointsFrédéric Danis2023-01-191-1/+1
| | | | | when the g_usb_interface is created from _g_usb_device_load(), self->endpoints may not be initialized.
* Fix g_usb_interface_finalize without endpointsFrédéric Danis2023-01-111-1/+2
|
* trivial: post release version bumpRichard Hughes2022-12-202-7/+5
|
* Release version 0.4.30.4.3Richard Hughes2022-12-202-0/+17
|
* trivial: Be less verboseRichard Hughes2022-12-091-3/+1
|
* Work around a libusb1 bug which causes devices to appear in the list twiceRichard Hughes2022-12-091-0/+6
|
* trivial: Fix up a gtk-doc commentRichard Hughes2022-10-261-1/+1
|
* Export g_usb_device_has_tag()Richard Hughes2022-10-265-6/+23
|
* trivial: post release version bumpRichard Hughes2022-10-182-5/+4
|
* Release version 0.4.20.4.2Richard Hughes2022-10-183-395/+186
|
* Do not call the hotplug callback with the mutex heldRichard Hughes2022-10-171-6/+22
| | | | | This fixes a regression introduced in 0ff5cca6 which causes a rare deadlock in fwupd.
* Revert "Use GRecMutex to avoid a single-threaded lockup"Richard Hughes2022-10-171-14/+5
| | | | | | This reverts commit cfb40102b0985d52cbd5d9348dedd1a4cc06b10c -- it's the wrong fix as the hotplug callback is being called by two different threads; even a recursive mutex isn't going to save us there.
* Close the GUsbDevice objects in gusbcmdRichard Hughes2022-10-171-0/+5
|
* Use GRecMutex to avoid a single-threaded lockupRichard Hughes2022-10-121-5/+14
| | | | | | | | | If we call libusb_get_bos_descriptor() in the hotplug device-add handler then we eventually call libusb_handle_events_completed() which can run handle_events -- which might emit devices. Using a mutex that's safe for recursing prevents the deadlock. This fixes half the problem when getting descriptors on deeply nested USB hubs.
* trivial: post release version bumpRichard Hughes2022-10-012-5/+5
|
* Release version 0.4.10.4.1Richard Hughes2022-10-012-1/+12
|
* Port from gtkdoc to gi-docgenRichard Hughes2022-09-3012-139/+98
| | | | Fixes https://github.com/hughsie/libgusb/issues/79
* Allow loading and saving only devices with specific tagsRichard Hughes2022-09-133-0/+60
| | | | | This would allow us, for example, to only load devices in bootloader or runtime phases.
* trivial: Don't return -1 for failure for a gbooleanRichard Hughes2022-09-131-1/+1
|
* trivial: Fix up clang-format issueRichard Hughes2022-09-131-1/+1
|
* Allow adding tags to the JSON device eventRichard Hughes2022-09-134-0/+76
| | | | This allows us to see which phase of the emulation should be used.
* Include the created time in the JSON eventRichard Hughes2022-09-131-0/+10
|
* trivial: Remove existing devices when loading a contextRichard Hughes2022-09-131-0/+4
|
* Include removed devices in the JSON dumpRichard Hughes2022-09-131-0/+13
| | | | This is needed to emulate devices with bootloader modes.
* trivial: Update to non-deprecated macos-12 CI targetRichard Hughes2022-09-121-2/+2
|