Commit Graph

8363 Commits

Author SHA1 Message Date
Richard Hughes
d4bfb0e53c Add a request ID for re-inserting the USB cable 2022-12-20 12:33:47 +00:00
Mario Limonciello
d09fb40ae2 trivial: don't comment out any daemon.conf keys by default
It's confusing to an end user if some keys are commented but others
aren't. The thought process is:

1) All keys are configured with their default value.
2) Commenting out a key should keep the default value.
3) Modifying a key sets a new value.
2022-12-19 15:01:33 -06:00
Mario Limonciello
b1ee46bc2a fu-config: Set defaults if conffile is missing
Line up the defaults for all keys in daemon.conf to match the code
behavior if the conffile was removed.
2022-12-19 15:01:33 -06:00
Richard Hughes
8bbc9056f6 trivial: Do not emit DeviceChanged before DeviceAdded 2022-12-19 16:49:50 +00:00
Denis Pynkin
4a1f9e8241 synaptics-cape: return false if version detection failed 2022-12-18 00:51:43 +03:00
Denis Pynkin
db57d9fe40 synaptics-cape: add the PID 0x0286
The device with PID=0x00298 has PID=0x0286 with the outdated FWre.
This change allows to recognize and update devices in the field to
the recent FWre version.
See: Google tracker issue 257197851

Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
2022-12-18 00:51:43 +03:00
Mario Limonciello
8d97e2fa93 tpm: don't require event log to have all reconstructions 2022-12-17 13:00:51 -06:00
Mario Limonciello
99f36cb494 tpm: Add support for sha384 2022-12-17 08:18:48 -06:00
Mario Limonciello
2e7355955a trivial: add missing colon in function docs 2022-12-17 07:23:09 -06:00
Richard Hughes
069fa56f1a Add fu_archive_firmware_get_image_fnmatch() for future use
It's useful to get images from archives by a specific filename extension.
2022-12-17 07:44:27 +00:00
Richard Hughes
08e3eaafe0 uefi-dbx: Ignore failure to mount the ESP if unsupported
I think this is only possible when a raw partition with no filesystem has the
ESP or BDP UEFI GUID set in the partition table.
2022-12-16 14:58:03 +00:00
Richard Hughes
63f4038328 Fix some trivial null-correctness spotted by Tartan 2022-12-15 17:27:22 +00:00
Richard Hughes
fbf4d3753b trivial: Use the correct integer type when getting the method caller 2022-12-15 17:27:22 +00:00
Richard Hughes
ce340e549d trivial: Do not use a GError for a critical problem 2022-12-15 17:27:22 +00:00
Richard Hughes
4cb7a20a68 superio: Return with failure if setting GError 2022-12-15 17:27:22 +00:00
Richard Hughes
a16d150ba9 superio: Do not set GError if not failing 2022-12-15 17:27:22 +00:00
Richard Hughes
4fc8685ca0 synaptics-cape: Prefix the GError correctly 2022-12-15 17:27:22 +00:00
Richard Hughes
a7c199bb59 elantp: Prefix the GError correctly 2022-12-15 17:27:22 +00:00
Richard Hughes
b9837e4140 trivial: Actually make the self test match the comment 2022-12-15 17:27:22 +00:00
Richard Hughes
23cc1ba495 trivial: Fix reading from garbage when getting the pending reboot
Fix the confusion by using a tmp variable.
2022-12-15 17:27:22 +00:00
Richard Hughes
9f8f08e6bd trivial: Remove useless duplication 2022-12-15 17:27:22 +00:00
Richard Hughes
5bbcd8703b trivial: Fix an impossible-to-hit read of undefined data 2022-12-15 17:27:22 +00:00
Richard Hughes
f3a541bf91 trivial: Add a device test for the CalDigit TS4 2022-12-15 17:09:51 +00:00
Richard Hughes
2c5ee07340 trivial: Fix debugging with FU_HID_DEVICE_VERBOSE 2022-12-15 16:41:55 +00:00
Richard Hughes
87ffda474b Allow getting the ESP when there is a block device with no filesystem
Fixes https://github.com/fwupd/fwupd/issues/5313
2022-12-15 08:38:25 +00:00
Vincent Huang
41dbc0292e synaptics-prometheus: add PIDs to quirk file 2022-12-15 08:05:06 +00:00
Richard Hughes
153b566867 Fix the regression to find all device GUID
This regressed in 000e986dc8 but we did not
notice because devices with only one GUID (e.g. ESRT devices) still worked as
before. Fix the error handling to only abort if none of the GUIDs are found.
2022-12-15 08:02:17 +00:00
Richard Hughes
790b9023f7 ti-tps6598x: Use the TX identity to set the PD VID&PID to the correct values
This allows us to match the firmware stream to the dock model perfectly,
without relying on the oUID and CONFIG being set to specific OEM values.
2022-12-14 20:29:48 +00:00
Denis Pynkin
c446211b10 ti-tps6598x: remove the delay on write
Speed up the write by removing the delay after SFWd write:
- 100ms (current): 3m 16s
- no delays: 1m 45s
2022-12-14 23:23:21 +03:00
Mario Limonciello
9e22e9c12f iommu: Suggest to turn on ThunderboltAccess for Lenovo systems
Lenovo systems that offer a BIOS setting for ThunderboltAccess will
use this option to control whether the IOMMU is enabled by default
or not.

It may be counter-intuitive; but as there are other more physically
difficult to attack PCIe devices it's better to have the IOMMU
enabled pre-boot even if it enables access to Thunderbolt/USB4.

Fixes: #5314
2022-12-14 08:44:27 -06:00
Richard Hughes
7a4fa63d0e Add a 'get-report-metadata' command to allow debugging metadata collection 2022-12-14 14:43:52 +00:00
Richard Hughes
2fcb6bd080 Add X-Dock and X-UsbDock update categories 2022-12-14 14:43:21 +00:00
Richard Hughes
2b8629afec Allow specifying OR parent requirements
For example:

    <requires>
      <!-- USB\VID_0451&PID_ACE1&OUID_0800000000000000 or
           USB\VID_0451&PID_ACE1&OUID_3300000000000000 -->
      <firmware depth="1">39cd2d79-f119-5e2b-ba57-0b101df5bebc|33c68fc5-fd3d-5cc8-951b-319368dfd6e8</firmware>
    </requires>
2022-12-14 14:14:08 +00:00
Richard Hughes
02e3549f1a trivial: Fix build failure when /var/cache/fwupd is not writable
The fu_context_load_quirks(FU_QUIRKS_LOAD_FLAG_NO_CACHE) has to be done first,
otherwise fu_context_load_hwinfo() auto-loads the quirk db with the defaults.

Fixes a build failure in Fedora QA.
2022-12-14 14:12:17 +00:00
Richard Hughes
41314f3b3f ti-tps6598x: Add a new plugin to update some TI USB-4 docks 2022-12-14 12:50:25 +00:00
Richard Hughes
9c989190d4 trivial: Fix a recently introduced -Wunused-variable 2022-12-14 09:51:22 +00:00
Richard Hughes
4ef8854618 trivial: Add convenience API for future use 2022-12-13 20:38:49 +00:00
Richard Hughes
882a7eec85 trivial: Fix warning when running fwupdtool --version 2022-12-13 13:47:35 +00:00
Richard Hughes
0d0ffa4708 Use prepared query when getting getting the bkc tags
There's no point parsing and optimizing this query 12 times at startup.
2022-12-13 13:47:22 +00:00
Richard Hughes
707b1ed6d5 trivial: Don't use xb_string_append_union() to join strings 2022-12-13 13:47:22 +00:00
Richard Hughes
970b4e3bda Use a prepared query when getting the remote ID
We do this a handful of times when calling GetDevices() and GetHistory() and
parsing the XPath expression each time is inefficient and kinda slow.
2022-12-13 13:47:22 +00:00
Richard Hughes
000e986dc8 Use the indexed query when getting releases for devices
This speeds up startup by ~9% on a machine with lots of devices attached.
2022-12-13 13:47:22 +00:00
Jakub Kolakowski
45f5b50d6f Add needs-shutdown flag for Solidigm NVMe device 2022-12-13 08:37:17 +00:00
Richard Hughes
83c90262d1 Remove plugin and device GRWLocks
This only have any protective effect if we're using multiple threads -- which
we're not. Removing these unused locks does not affect startup speed, but does
drop the idle RSS by ~10kB.
2022-12-12 17:29:38 +00:00
Richard Hughes
18dac1885d Fix a tiny memory leak when parsing signed reports 2022-12-12 17:29:17 +00:00
Richard Hughes
ef6c399a64 Fix a tiny memory leak when probing MEI devices 2022-12-12 17:29:17 +00:00
Richard Hughes
f3fdb7f6a9 Only write devices.json once at startup, rather than for each device add
This means we do 15% less i/o at startup, which means we start a lot faster.
2022-12-12 15:27:55 +00:00
Richard Hughes
92057fe0f1 Do not filter in fwupdtool for ->attach() if specifying --force 2022-12-12 13:51:40 +00:00
Richard Hughes
9549cd3a18 Allow reinstalling on devices with only-version-upgrade set
All three devices with that flag support reinstalling the current version for testing.
2022-12-12 12:56:00 +00:00
Richard Hughes
38dfdfd42e Convert FuProgress to a FINAL object
We're not going to subclass this, and making it final saves during startup:

 * 300K calls of fu_progress_get_instance_private()
 * 280K calls of fu_progress_get_step_weighting()
2022-12-11 20:26:15 +00:00