Commit Graph

4304 Commits

Author SHA1 Message Date
Richard Hughes
481b01046b ccgx: Allow forcing firmware of the wrong app_type with fwupdtool
If we corrupt the flash, the app_type is 0x0 and we need to force this with a
known-good image to recover the hardware. Ask me how I know.
2020-04-07 18:43:31 +01:00
Richard Hughes
de65a9140c trivial: Show what firmware we're installing onto the device 2020-04-07 18:43:31 +01:00
Richard Hughes
f3966c784d Modularize the hardware tests 2020-04-07 16:09:47 +01:00
Richard Hughes
ee562b5164 Ignore indirect devices that replug during the composite firmware update
This fixes the confusing case where installing the CCGX firmware on a dock
would reboot the hub, leading to this output:

Installing on USB-I2C Bridge…                                    ]
Installing on USB2.0 Hub…[************************************** ]
Installing on USB3.1 Hub…[************************************** ]
Installing on USB2.0 Hub…[************************************** ]
Installing on USB3.1 Hub…[************************************** ]
Installing on ThinkPad USB-C Dock Gen2 USB Audio…*************** ]
Installing on USB-I2C Bridge…*********************************** ]
Restarting device…       [***************************************]

With the patch, this is now:

Installing on USB-I2C Bridge…                                    ]
Restarting device…       [***************************************]
2020-04-07 15:04:01 +01:00
Richard Hughes
0bc65b5e97 Export the device state as part of the D-Bus interface 2020-04-07 15:04:01 +01:00
Richard Hughes
949af578ea Fix devices that use CounterpartGuid when more than one device is installed
Rather than return the first device with a matching counterpart GUID, and then
check to see if it was removed -- instead just return any item that matches and
has been removed.

This fixes updating the Logitech unifying receiver when more than one type of
device (e.g. RQR12 and RQR24) are connected.
2020-04-07 14:44:06 +01:00
Richard Hughes
66dc7362e8 Use the GUID as a fallback rather than the connection ID
Prefer a removed device with the same physical and logitcal connection than a
GUID fallback.
2020-04-07 14:44:06 +01:00
Ryan Lee
b9fecc4b9c ccgx: Fix critical warning on i2c write failure 2020-04-07 10:47:01 +01:00
Richard Hughes
f1fa73e349 trivial: Allow using --force with install-blob 2020-04-06 14:36:46 -05:00
Richard Hughes
9e755e2a5c logitech-hidpp: Do not add peripheral devices for receiver in BL mode
This should fix flashing firmware when there are >= 2 receivers plugged in.

Fixes https://github.com/fwupd/fwupd/issues/1951
2020-04-06 14:20:46 -05:00
Ross Burton
d783c3a531 Install the installed-tests only if tests are enabled
The README says: "A test suite that can be used to interact with a fake device is installed when configured with `-Ddaemon=true` and `-Dtests=true`", so actually only install these tests when tests are enabled.
2020-04-06 12:16:52 -05:00
Mario Limonciello
0c9d083d53 trivial: ci: drop unsupported lintian strings
'binary-is-wrong-architecture' was dropped from lintian 2.62.0
2020-04-06 09:24:11 -05:00
Richard Hughes
58f85d26ea trivial: Recognize .jcat files as a signature to fix CLI progress message 2020-04-03 16:29:56 +01:00
Richard Hughes
a1de20665a Load the signature to get the aliased CDN-safe version of the metadata
Switch to downloading the signature first, which we can then load to get the
suffixed build-specific URL of the actual metadata file. You need to have
libjcat 0.1.1 installed and fwupd built against the new version for this to
work.

Fixes https://github.com/fwupd/fwupd/issues/391
2020-04-03 16:27:04 +01:00
Mario Limonciello
7a9bb7e7a7 trivial: Add a new category for CPU microcode 2020-04-02 12:18:01 -05:00
Richard Hughes
ca03290a12 vli: Only reboot the USB hub once
The cleanup action for the FuVliUsbhubPdDevice is correct, but was not
conditionalized in the composite cleanup, which meant we would reboot twice
for a normal USB hub update.

Move the parent reboot into the right place, although this does mean we might
reboot twice in the rare event of scheduing a FuVliUsbhubPdDevice *and*
FuVliUsbhubDevice update in the same transaction -- but resetting the device
state between updates is arguably correct anyway...
2020-04-02 13:23:40 +01:00
Richard Hughes
2671aaceb2 synaptics-cxaudio: Only use the PATCH2 address when the patch level is 2 2020-04-02 13:23:16 +01:00
Ilya Guterman
257df03f58 add STM32F745 stm dfuse quirk 2020-04-02 13:22:53 +01:00
Richard Hughes
5af1dc69d4 dfu: Add a way to set the timeout from a quirk 2020-04-02 13:22:28 +01:00
Richard Hughes
52c1a4d38e Export the release urgency
Show it in the various command line tools if it has been set by the vendor.
2020-04-02 13:22:07 +01:00
Richard Hughes
14797f8a86 Export the release creation time
Show it in the various command line tools if it has been set by the vendor.

Fixes https://github.com/fwupd/fwupd/issues/1945
2020-04-02 13:22:07 +01:00
Mario Limonciello
e4fa62b1d1 trivial: contrib: drop Jared from uploaders 2020-04-01 16:51:42 -05:00
Richard Hughes
1ee1800240 Check the firmware requirements before adding SUPPORTED 2020-04-01 13:58:31 -05:00
Paul Menzel
bf1b876e56 data/motd/fwupd-refresh: Only order after network.target
From [Lennart’s answer on systemd-devel][1]:

> fwupd.target should not list the various network management solutions,
> that is unnecessary, and ordering after network.target should be
> sufficient to achieve the same, in a generic fashion. i.e. network
> managers should order themselves before network.target, so that
> ordering yourself after that automatically orders you after all
> implementations at once...

So, remove the unneeded targets. As the service unit is not
installed/enabled, and instead called by a timer, the system will most
probably be online already.

[1]: https://lists.freedesktop.org/archives/systemd-devel/2020-March/044205.html
     "Best practices for starting unit only if network is online"
2020-04-01 13:14:41 -05:00
Richard Hughes
b951a18fae ccgx: Do not add the HID device that will disconnect 2020-04-01 10:38:50 +01:00
ChangHee (Ryan) Lee
60103e2207 ccgx: Use Silicon ID and Application type to set flash parameters
Also remove unused instance id and fix application type matching as we now get
the image type from the quirk file.
2020-04-01 10:38:50 +01:00
Richard Hughes
b4f14e8f0f Only set the parent ID when adopting children
We use the ParentGuid quirk key to logically 'tie-together' different discrete
devices into one logical device, for instance making the USB soundcard in a hub
the child of the USB controller on the same PCB.

Setting the discrete child is sometimes correct, for instance when rebooting
the hub, the audio device also goes away -- but it's also sometimes wrong.
If we set the child for a discrete device and the parent does *not* go away
then we get to a situation where the child reference may no longer be valid
if it comes back as a different object.
When we try to remove this no-longer-valid device with the removal timeout the
daemon segfaults. This is realy bad.

Continue to allow using fu_device_add_child() in plugins, where we know the
child lifecycle is is matched by the the parent. In the engine just set the
parent ID directly and let the client use this information to show the tree of
logical devices correctly. There's no benefit to setting up the children as
referenced objects anyway.
2020-04-01 10:38:50 +01:00
Mario Limonciello
61f74077ed trivial: dfu: drop quirk to hide DW1820A
This can't actually damage the device, it was just showing the wrong flags.
The device is also EOL, so it won't even be seen on most modern machines.
2020-03-31 13:05:57 -05:00
Mario Limonciello
3dbb92e5d5 trivial: fu-config: Fix behavior for UpdateMotd key
If the file was missing or corrupted the default behavior for this
key should be "TRUE".
2020-03-31 13:05:57 -05:00
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