Commit Graph

4025 Commits

Author SHA1 Message Date
Mario Limonciello
4fa95a7b51 Add a new daemon configuration option to control EnumerateAllDevices
For plugins that are configured to only enumerate devices supported
by metadata this will allow showing them in all contexts

Fixes: #1877
2020-03-31 13:05:57 -05:00
Mario Limonciello
80d9b7450c logitech_hidpp: set the bootloader protocol 2020-03-31 13:05:42 -05:00
Richard Hughes
5422de3bac trivial: Use subprojects when building using LGTM 2020-03-31 17:19:11 +01:00
Richard Hughes
46b8fc472f Install meson from pip for LGTM 2020-03-31 16:14:04 +01:00
Richard Hughes
aeb59af206 trivial: Remove a FIXME in the verbose log 2020-03-31 12:13:51 +01:00
Filipe Laíns
674478d4b8 bash: add completion for fwupdtool reinstall
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-03-31 10:46:40 +01:00
Filipe Laíns
b2f377a00c fu-tool: add reinstall command
Closes #1914

Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-03-31 10:46:40 +01:00
Filipe Laíns
d3a4fd3e1c fu-engine: export fu_engine_get_releases_for_device in header
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-03-31 10:46:40 +01:00
Richard Hughes
6fa43550fc vli: Wait for the VL103 to timeout to fix detach
The default re-enumeration delay is not sufficient.
2020-03-31 09:34:15 +01:00
Richard Hughes
61d9449d31 ccgx: Show the UpdateMessage in the correct device mode 2020-03-31 08:59:27 +01:00
Richard Hughes
be12af78f0 ccgx: Add extra instance IDs to match specific firmware
The VID:PID of the device in HPI mode is shared between multiple vendors, and
so we need to use both the silicon ID and the application ID to match specific
firmware updates.
2020-03-31 08:59:27 +01:00
Mario Limonciello
0392665051 trivial: snap: build using meson 0.54
libjcat bumped the meson dep up newer than we were using.
2020-03-30 19:22:47 -05:00
Richard Hughes
fe4b3eadaa trivial: Use the same source version string between daemon and client
This fixes the common problem encountered when developing plugins:

    ./src/fwupdmgr get-devices
    Unsupported daemon version 1.4.0, client version is 1.4.0-179-gcf8095d5
2020-03-30 13:58:25 +01:00
Richard Hughes
cf8095d5af Use a static version number
Getting the version string from git means the commit version changes each time
we commit any patch, which means we need to use --force to install firmware
when building fwupd against a version that should be compatible.

It is also very inconvenient not bumping the release version for git snapshots
as firmware can no longer depend on the "planned" release triplet.

tl;dr: A good idea for Flashrom, not so awesome for me.
2020-03-29 12:17:52 +01:00
Mario Limonciello
97acc2bf74 thunderbolt: Rather than hardcoding to PCI slot numbers, use domain in GUID
This allows the PCI topology to change, but assumes that thunderbolt host controllers
are enumerated in the same order every time.
It won't matter if the first controller jumped from bus 5 to 7 and consequently the
second from 65 to 71, but rather that the first was enumerated followed by the second.
2020-03-28 09:52:38 -05:00
Mario Limonciello
e6d76a594c Revert "thunderbolt: Create a unique GUID including Thunderbolt controller path"
This reverts commit 7e38dffdcb.
2020-03-28 09:52:38 -05:00
Richard Hughes
eb326f7546 dell-dock: Port to fu_device_retry() 2020-03-28 12:46:03 +00:00
Richard Hughes
b02872cbea trivial: Add two unrecoverable error codes to all USB devices 2020-03-28 12:46:03 +00:00
Richard Hughes
00e43fe50e trivial: Allow using NULL as func for fu_device_add_possible_plugin()
This should be used when a device recovery is not possible.
2020-03-28 12:46:03 +00:00
Richard Hughes
461149e636 nitrokey: Convert to use FuHidDevice 2020-03-28 12:46:03 +00:00
Richard Hughes
355d5d545d nitrokey: Port to fu_device_retry() 2020-03-28 12:46:03 +00:00
Richard Hughes
a3740518b2 vli: Port to fu_device_retry() 2020-03-28 12:46:03 +00:00
Richard Hughes
49797d7de4 ccgx: Reset the i2c bridge on status failure 2020-03-28 12:46:03 +00:00
Richard Hughes
89a5ed01ef trivial: Add fu_device_retry_set_delay() to set a generic device delay 2020-03-28 12:46:03 +00:00
Richard Hughes
348719f759 Add fu_device_retry() helper functionality
Sometimes plugins need to retry various commands send to hardware, either due
to unreliable transfers (e.g. using USB bulk) or from slightly quirky hardware.

Between them they seem to get various things wrong; either the error messages
are repeated and thus difficult to parse, or they just get the memory handling
of `g_propagate_prefixed_error()` wrong.

Providing sane helpers we can reduce the amount of boilerplate. Additionally
we can support a 'reset' function that can try to automatically recover the
hardware for specific error domains and codes.
2020-03-27 15:47:08 +00:00
Richard Hughes
8e86b1ec4c trivial: Fix the ThinkPad USB-C Dock Gen2 audio device parent 2020-03-27 14:25:17 +00:00
Richard Hughes
5d787b5958 trivial: Set up the parent GUIDs for the Lenovo Gen2 Dock 2020-03-27 13:57:09 +00:00
Richard Hughes
81da69e73d ccgx: Implement writing firmware to flash
Correctly attach into the alternate mode after the update has completed.

The vendor was appending two files to make LVFS distribution 'easier' but I'd
much rather use the same deliverables as Windows. This also allows us to
simplify the firmware loading.
2020-03-27 13:25:40 +00:00
Changhee (Ryan) Lee
338f5a4083 ccgx: Add i2c status check when reading or writing registers
Signed-off-by: Richard Hughes <richard@hughsie.com>
2020-03-27 13:25:40 +00:00
Changhee (Ryan) Lee
064c5cce19 ccgx: Add 5ms delay between read registers to avoid an i2c error
Signed-off-by: Richard Hughes <richard@hughsie.com>
2020-03-27 13:25:40 +00:00
Richard Hughes
184baf6f4a trivial: Partially revert some of 464eacdc
The FuUsbDevice was using a locker of NULL to indicate unlocked, and just
calling `fu_device_locker_close()` does not unset the object.
2020-03-27 13:21:47 +00:00
Richard Hughes
464eacdc53 libfwupdplugin: Use fu_device_locker_close() 2020-03-26 15:23:10 -05:00
Richard Hughes
d66a445ada synaptics-mst: Use fu_device_locker_close() 2020-03-26 15:23:10 -05:00
Richard Hughes
a1882f8c4b Add fu_device_locker_close()
This allows us to manually close the locker, allowing proper error handling.
2020-03-26 15:23:10 -05:00
Mario Limonciello
f35be1c393 trivial: ci: exclude ia64 for flashrom 2020-03-25 09:51:12 -05:00
Richard Hughes
87d39d06a3 ccgx: Do not store the silicon ID in the image address
First, it's a hack; second we actually need to store the start address for
flashing FW2 on asymmetric hardware...
2020-03-24 21:16:08 +00:00
Richard Hughes
bf5481e358 ccgx: Add device quirks for the Lenovo Hybrid Dock 2020-03-24 21:16:08 +00:00
Richard Hughes
9278e265b4 ccgx: Switch HID mode to HPI mode at startup 2020-03-24 21:16:08 +00:00
Richard Hughes
dab6bda2be ccgx: Clear the event queue when in startup 2020-03-24 21:16:08 +00:00
Richard Hughes
fd7f13f905 ccgx: Wait for hardware to settle when coming out of reset 2020-03-24 21:16:08 +00:00
Richard Hughes
3990a71401 ccgx: Do not mark the device as updatable when in boot mode 2020-03-24 21:16:08 +00:00
Richard Hughes
c6147bf340 ccgx: Verify the firmware app type when preparing firmware 2020-03-24 21:16:08 +00:00
Richard Hughes
754d85e282 ccgx: Set the update message when running in backup firmware 2020-03-24 21:16:08 +00:00
Richard Hughes
de61d27259 ccgx: Read the FwAppType from the hardware 2020-03-24 21:16:08 +00:00
Richard Hughes
2b45362e25 ccgx: Set the HPI version number for the current firmware 2020-03-24 21:16:08 +00:00
Richard Hughes
c6a671be7e ccgx: Get the silicon ID to map the flash parameters 2020-03-24 21:16:08 +00:00
Richard Hughes
11fa0a1e90 ccgx: Read the HPI device mode at startup 2020-03-24 21:16:08 +00:00
Richard Hughes
0a37232ba1 ccgx: Set up the HPI I²C config at startup 2020-03-24 21:16:08 +00:00
Mario Limonciello
36ffd92695 trivial: fix ubuntu CI 2020-03-24 10:02:28 -05:00
Richard Hughes
69b761ce64 trivial: Export fu_device_add_instance_id_full() for plugins to use
Sometimes we only want to add the instance ID to get the quirk matches, and it
is confusing to see the "fake" IDs in the 'fwupdmgr get-devices' output.
2020-03-24 14:43:31 +00:00