Commit Graph

4304 Commits

Author SHA1 Message Date
jf049
f0a3bf0436 trivial: Add OUI quirk for ADATA 2020-04-23 06:47:19 +01:00
Daniel Peukert
3cebd5aa89 trivial: Add OUI quirk for LITE-ON 2020-04-22 12:43:39 -05:00
Daniel Peukert
8a4b32f699 trivial: Reorder OUI quirks by OUI ID 2020-04-22 12:43:39 -05:00
Richard Hughes
c92a2caf16 ep963x: Various changes to make the plugin actually work on real hardware 2020-04-22 12:27:44 +01:00
Richard Hughes
9c09e2c9bc trivial: Fix some recent NULL/FALSE confusion 2020-04-22 10:53:59 +01:00
Richard Hughes
0d4e2ca4c5 Make tss2-esys conditional
This is not provided in RHEL 8 in the default build root.
2020-04-22 09:36:14 +01:00
Richard Hughes
f0ec4dee4d trivial: Fix a merge-conflict remnant spotted by Coverity 2020-04-21 16:46:05 +01:00
Richard Hughes
7b0023de7f ep963x: Remove some dead code spotted by Coverity 2020-04-21 16:45:31 +01:00
Richard Hughes
b74db0618c ccgx: Only update the FW2 partition of the ThinkPad USB-C Dock Gen2 2020-04-21 14:34:03 +01:00
Richard Hughes
6adbcd2e62 ccgx: Expand the FWImageType for future hardware
This is needed to handle devices that do need the bootloader updated before the
actual firmware image.
2020-04-21 14:34:03 +01:00
Mario Limonciello
c6009f59fe trivial: fu-util/fu-tool: check for '-' in arguments
Make sure if something doesn't look like a duck that it's not a duck.
2020-04-21 09:04:50 +01:00
Mario Limonciello
bc3c241f91 trivial: fu-util: fix using a GUID for update command 2020-04-21 09:04:50 +01:00
Mario Limonciello
9917bb44bc trivial: fu-tool: correct a reference to wrong device ID when using GUID
When finding the device by GUID we need to do a lookup first.
2020-04-20 13:42:31 -05:00
Mario Limonciello
aac9c74ec6 trivial: fu-tool: correct an infinite loop from 3aaf53c6f0 2020-04-20 13:39:17 -05:00
Richard Hughes
3aaf53c6f0 Allow specifying the device on the command line by GUID
The GUID is the only stable identifier, and allowing using the GUID makes it
much easier to test specific devices.
2020-04-20 18:45:45 +01:00
Richard Hughes
1bde4fdd29 Fix the DeviceID set by GetDetails
The returned ID is the result of the SHA1 hash of the actual device ID. This
does not match anything found by the client, and so the install fails.

The symbol is exported as I think the device ID is an important identifier and
used in various fwupd tools.

When backported to the stable branch the verification should just be a static
function in src/fu-engine.c rather than a new symbol.
2020-04-20 17:42:22 +01:00
Richard Hughes
53e22ed0c1 wacom-usb: Fix a theoretical buffer over-read to make GCC happy 2020-04-20 15:50:10 +01:00
Jan Tojnar
463db5162f build: Allow overriding prefix for systemd file installation
It is a good practice to install files relative to our own variables
https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/
and it is required on systems like NixOS.

Unfortunately, systemd allows overriding the root prefix,
see also 1c2c7c6cb3,
so we cannot just do that.

Let's at least make the systemd installation prefix overridable.

This will also allow us to drop `systemdsystemunitdir` option since
systemd hardcodes it to `${rootprefix}/lib/systemd/system`.
2020-04-18 15:22:10 +01:00
Richard Hughes
36f3218da9 vli: Only show the i2c devices on the USB3 hub
If the hub is running in degraded USB2 recovery mode do not enumerate the
easy-to-brick MSP430 device.
2020-04-18 14:52:50 +01:00
Richard Hughes
8500b4f233 Allow devices to be updatable, but only when upgrading a proxy device 2020-04-18 14:39:43 +01:00
Richard Hughes
395f936b72 Reset the progressbar time estimate if the percentage is invalid 2020-04-17 21:49:24 +01:00
Richard Hughes
ec279f161c ccgx: Always report 100% when finished writing 2020-04-17 21:49:15 +01:00
Richard Hughes
86ae91c144 Add a device quirk that forces an explicit device-id match
This means we do not do the GUID or counterpart GUID matching when adding
devices. Only an exact device-id match or when both the physical and logical
IDs match will the device be considered the 'same'.

This is to handle devices that could share the same GUIDs in both child and
parent modes where the logical ID differs.
2020-04-17 21:48:59 +01:00
Richard Hughes
da645fe912 ccgx: Set the device name and summary from quirk files
Based on a patch by Ryan Lee <ryle@cypress.com>, many thanks.
2020-04-17 21:48:02 +01:00
Richard Hughes
cacf14e54f trivial: Add OUI quirk for Toshiba 2020-04-17 18:48:35 +01:00
Richard Hughes
6f6f1161a9 trivial: Set the quirk object automatically from the parent
This means we do not have to manually set the quirks for each child, and means
we get the quirk set at object construction before any instance IDs are set.
2020-04-17 17:47:40 +01:00
Richard Hughes
518712ac09 vli: Only do the APP5 FW bug fix on affected hardware 2020-04-17 16:09:32 +01:00
Richard Hughes
5997f2a7da vli: Show all the buffer when debugging with FWUPD_VLI_USBHUB_VERBOSE 2020-04-17 14:15:50 +01:00
Richard Hughes
f9b9af5fca trivial: Allow setting device parents using GObject properties
Fix copy-paste accidental regression introduced in cafcc4.
2020-04-17 14:01:28 +01:00
Mario Limonciello
e038419240 fu-engine: Refresh device name and format before setting supported flag
Cached metadata was not working for setting the supported flag because
of a difference in version format.  The version format needs to be applied
to the device before applying the supported flag.

This particularly helps UEFI devices which set the version format to number
but in practice all metadata sets it to something different.

Fixes: #2005
2020-04-16 14:57:45 -05:00
Jan Tojnar
0f035013df build: Install bash-completion relative to datadir
Since bash-completion 2.9, it was no longer possible to override
the completionsdir through prefix. [1] In 2.10, the overridability
was re-estabilished but this time through datadir variable. [2]

This should not really matter except for developers installing the project
into a custom prefix or distros using per-package prefixes like NixOS.

[1]: 81ba2c7e7d
[2]: https://github.com/scop/bash-completion/pull/344
2020-04-16 12:45:19 -05:00
Richard Hughes
a89a70cc24 trivial: Do not set the device parent when already set to the client
This can happen if the devices swap roles, and if the parent is set as itself
then fwupdmgr refuses to show the child device.
2020-04-16 18:01:20 +01:00
Richard Hughes
ca6af0b8f1 trivial: Add some debugging on the install task queue 2020-04-16 18:01:20 +01:00
Richard Hughes
88d560abc8 trivial: emit notify when logical or physical IDs change 2020-04-16 18:01:20 +01:00
Richard Hughes
8bb6498600 trivial: Add some error prefixes to help debugging 2020-04-16 18:01:20 +01:00
Richard Hughes
269cdb07e7 trivial: Minor gtk-doc fixup 2020-04-16 18:01:20 +01:00
Richard Hughes
10fffc7fe3 trivial: Add some tests to verify the install task ordering 2020-04-16 18:01:20 +01:00
Richard Hughes
1424c4dfbe Allow a device to set the logical or physical ID during ->setup()
The device might not know what mode it is running in until after the device has
been opened.
2020-04-16 16:29:33 +01:00
Richard Hughes
08d5caa758 ccgx: Split out a trivial helper to set the instance IDs
As a consequence, the version number is also set in the event that the silicon
or firmware app-id is not set, which also seems like the right thing to do.
2020-04-16 15:52:55 +01:00
Richard Hughes
919d90e941 ccgx: Set the device name to be more useful
Based on a patch by Ryan Lee <ryle@cypress.com>, many thanks.
2020-04-16 15:52:55 +01:00
Richard Hughes
e419792c61 ccgx: Set the logical ID as the FwMode 2020-04-16 15:52:55 +01:00
Richard Hughes
d41e8254ca ccgx: Split out a trivial function to set the version 2020-04-16 15:52:55 +01:00
Richard Hughes
71f5eaa371 ccgx: Do not reboot the device write after installing
Since a8c6c0 we do not conditionalize the attach on the BOOTLOADER flag, and so
attach gets run once manually, and then again automatically.
2020-04-16 15:52:55 +01:00
Richard Hughes
54e3feae12 ccgx: Do no show the flash parameters when unknown 2020-04-16 15:52:55 +01:00
Richard Hughes
35ca4cbc61 Allow devices to match the proxy device by GUID
This allows us to use a proxy even if the proxy device was created in a
different plugin or where the GTypes are not known to each other.
2020-04-16 15:52:34 +01:00
Richard Hughes
327621beef trivial: Remove double call to g_source_remove()
The fu_device_list_replace() function does this automatically.
2020-04-16 08:50:12 -05:00
Richard Hughes
1283c2696d Do not skip attach() if the device is marked _WILL_DISAPPEAR
The idea here is that the device would not come back after it was restarted,
and skipping the attach in the engine was only working around the fact that the
ebitdo did not split out an ->attach() function.

We can't really blame it; we only decoupled the _IS_BOOTLOADER requirement
for ->attach() recently...
2020-04-16 08:43:45 -05:00
Mario Limonciello
c727742df3 trivial: remove references to hardware.py (Fixes: #2007) 2020-04-15 20:27:21 -05:00
Richard Hughes
a1ef52e5f9 dell-dock: Port to using fu_device_get_proxy()
This also cleans up the memory handling to prevent a ref-cycle loop that
prevented the dock devices from being finalized if the dock was removed.
2020-04-15 20:34:31 +01:00
Richard Hughes
cafcc40016 Allow adding a device 'proxy' device that can do actions on it 2020-04-15 20:34:31 +01:00