Commit Graph

3428 Commits

Author SHA1 Message Date
Richard Hughes
910f58d9ce cros-ec: Fix an uninitialized buffer warning from valgrind 2023-02-10 11:02:34 +00:00
Richard Hughes
eff7bfed8e analogix: Do not check the endpoints before selecting an interface
My Analogix USB device has a Billboard interface, with bNumEndpoints=0.

When emulating the interface is NULL, and in runtime the array can *never* be
NULL, so I think this check was added in error.
2023-02-10 10:52:58 +00:00
Richard Hughes
390796c0d3 ti-tps6598x: Fix a small memory leak when flashing new firmware 2023-02-10 10:52:09 +00:00
Richard Hughes
fb4e8446c1 wacom-usb: Use the device proxy functionality
The wacom-usb plugin was created in a simpler time, before we had the concept
of `FuDevice.proxy`. Switch to the shared code to modernize the code, and also
because setting the proxy conveys other semantics that we need to emulate the
device successfully in the future.
2023-02-09 16:43:52 +00:00
Richard Hughes
41544e62a3 trivial: Remove the now-unused FWUPD_WAC_EMULATE check 2023-02-09 16:43:52 +00:00
Richard Hughes
0e0504cc64 ccgx: Add support for the CalDigit Element Hub 2023-02-09 08:46:52 +00:00
Richard Hughes
58cbb15e64 ccgx: Detect factory mode and set a non-zero version
The Element Hub (and several other docks that use the CCGX5 DMC reference
design) is in "factory mode" out of the box, displaying a version of `0.0.0.0`

Detect factory mode and set a non-zero version -- using the "real" version if
possible by matching the CCG5 devx base firmware firmware.
2023-02-09 08:46:52 +00:00
Richard Hughes
9fdfcfe499 wistron-dock: Use only-wait-for-replug to speed up device replug
Also, set the progress steps correctly.
2023-02-07 11:24:03 +00:00
Richard Hughes
70417a3aee wistron-dock: Fix critical warning during update 2023-02-07 11:24:03 +00:00
Richard Hughes
d4109b9f79 trivial: Fix Fedora CI when it cannot autostart udisks 2023-02-07 11:00:53 +00:00
Richard Hughes
7116ff94c2 cros-ec: Clear the bulk transfer buffer to zero before using
This allow us to emulate the device as the buffer contents are now 100%
predictable and replayable.
2023-02-07 09:30:51 +00:00
Richard Hughes
986b811b3d trivial: Fix a tiny coverity-spotted memory leak on error 2023-02-06 10:24:03 +00:00
Richard Hughes
aef162223f nvme: Detect and warn users with the broken firmware 3B2QGXA7 2023-02-03 17:31:42 +00:00
Richard Hughes
c6a3a6e82c trivial: Fix critical warning when loading an emulated DFU device 2023-02-03 16:53:48 +00:00
Richard Hughes
b3343755a4 ti-tps6598x: Ignore the 'wrong' USB device class before calling ->setup()
No functional change, but a few less i/o operations when inserting the dock.
2023-02-02 08:18:28 +00:00
Richard Hughes
b8631d5e4d dfu: Use more const buffer data when writing to AVR chips 2023-02-01 18:20:26 +00:00
Richard Hughes
add087966d dfu: Clear the buffer before getting the status
This makes emulation of DFU devices work as the control transfer data is then
predictable.
2023-02-01 18:20:26 +00:00
Richard Hughes
99df74f0c2 Add API to wait for a device
This allows us to ignore all the delays when the device is emulated, with the
idea being to do dozens of device emulations in the CI tests.

Also, do not call fu_progress_sleep() when the device is emulated.
2023-02-01 09:42:08 +00:00
Richard Hughes
6e34a90a12 trivial: Add FuProgress to fu_context_load_hwinfo()
TIL: fu_bios_settings_setup() takes over 50ms (10%!) at startup.
2023-01-30 14:47:44 +00:00
Richard Hughes
234ff36cff ti-tps6598x: Assign the DMC as the proxy rather than just the parent
We 'write through' the parent, and by telling fwupd this we can make better
decisions when emulating.
2023-01-30 12:00:04 +00:00
Richard Hughes
854bec2e17 colorhug: Show the flash success value in debugging 2023-01-26 08:55:49 +00:00
Ivan Mikhanchuk
af5fb429c8 modem-manager: remove improper use of assert
FuSaharaLoader being NULL is normal for devices that only
support Firehose and don't use Sahara QDL port.
2023-01-24 20:54:43 -06:00
Jason Gerecke
8076090a00 wacom-usb: Retry set_report on failure
Sometimes the flash process will randomly hang and time-out when sending
data to the device. We currently do not use any retry logic, so if this
happens the flash attempt is treated as a failure. This can be a source
of worry or frustration, especially if subsequent manual retries fail
in a similar way.

Adding FU_HID_DEVICE_FLAG_RETRY_FAILURE to the list of flags used when
calling fu_hid_device_set_report allows fwupd to try sending a block
multiple times if such a time-out (or other error) occurs. This makes
the flash process less prone to failure.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
2023-01-24 18:09:09 +00:00
Daniil Lunev
8e1715779e emmc: correct legacy GUID generation
It used to be generated with decimal, not hexadecimal values.

Change-Id: I2a6a5bdea50e2d08a7de9f65a1f9a03de29e1591
2023-01-22 20:40:38 -06:00
Aaron Skomra
189686368a wacom-usb: prefix errors that occur when writing to the device
Make it easier to locate errors that occur when writing to the device.
2023-01-18 19:36:45 -06:00
Michal Suchanek
5688191a7b uefi-capsule: Do not call grub2-probe without arguments
commit 684bc0381 ("trivial: fix various shellcheck warnings") adds call
to ${grub_probe} without any argument which causes grub2-probe to return
an error, and generating grub configuration fails.

Add --version argument to avoid the error, and redierct the output to
/dev/null so that it's not included in the grub configuration file.

The commit also adds superfluous single quotes causing another error:

/usr/sbin/grub2-probe: error: cannot find a GRUB drive for `${grub_probe} --target=device \${ESP}` | sed -e "s/^/\t/".  Check your device.map.

Fix the quoting to work at least for single device.

Fixes: #5424
Fixes: 684bc0381 ("trivial: fix various shellcheck warnings")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2023-01-18 10:56:26 -06:00
Mario Limonciello
52d6c3cb78 Update documentation to indicate that loading "OS Optimized Defaults"
may enable security processor rollback protection on Lenovo systems.

fixes: #5394
2023-01-18 08:08:16 +00:00
Richard Hughes
72f5c1e01e trivial: Make the installed-tests redfish.conf secure to avoid a warning
Also, don't attempt to change the permissions if the correct one is already
set.
2023-01-17 19:29:39 +00:00
Vincent Huang
a01b57b17d
synaptics-rmi: add feature to verify signature (#5406) 2023-01-17 09:33:49 +00:00
Richard Hughes
0e381a8666 trivial: Store the chassis kind in the context 2023-01-16 17:49:57 +00:00
Richard Hughes
8af1943142 trivial: Add FuContextHwidFlags for future usage 2023-01-16 17:49:57 +00:00
Richard Hughes
84217074b0 Allow dumping CFI devices using fwupdtool
This regressed with 7dc34ff02e.
2023-01-13 15:43:39 +00:00
Richard Hughes
c10ffb119d trivial: Show a better error when reading am empty CFI flash ID 2023-01-13 15:43:39 +00:00
Jeremy Soller
17f35e206b Add System76 launch_heavy_1 2023-01-12 09:09:12 +00:00
Richard Hughes
cf4f34572b Add fu_context_get_fdt() to get the Flat Device Tree
This is needed because multiple plugins will soon be consuming the system FDT,
and we don't want to either parse this multiple times, or duplicate the loading
logic.
2023-01-11 16:25:26 +00:00
Richard Hughes
7cc725b918 vbe: Remove the stored VBE dir
This can be easily retrieved using LOCALSTATEDIR_PKG by the subclass.
2023-01-10 20:40:57 +00:00
Vincent Huang
8d365e84de synaptics-rmi: add support to write signature 2023-01-10 14:59:11 +00:00
Richard Hughes
b1ea3fab8c dfu: Add some wisdom for vendors implementing devices 2023-01-10 14:58:57 +00:00
Richard Hughes
058dc2301a Include the plugin README text in the generated docs 2023-01-10 14:58:30 +00:00
Richard Hughes
2c20ade1db emmc: Add back a legacy GUID to fix a regression
I had no idea anyone was using this, so apologies. The instance ID is completely
wrong, but it is effectively D-Bus ABI and we need to support old firmware in
the field.
2023-01-09 15:39:36 +00:00
Vincent Huang
1ef407968e synaptics-rmi: add support to more firmware partitions 2023-01-06 11:45:55 +00:00
Sean Rhodes
d83007e1c8
plugins/flashrom: Allow 32MiB images for the StarBook Mk VI (#5383)
Also allow 32MiB images for the coreboot firmware

Signed-off-by: Sean Rhodes <sean@starlabs.systems>

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2023-01-06 10:12:36 +00:00
Vincent Huang
716a98e70a synaptics-rmi: add support to USBHID devices 2023-01-06 07:55:02 +00:00
Ivan Mikhanchuk
ed6011fc4d modem-manager: add quirk for Quectel RM520 modem
Quectel RM520 is based on Qualcomm SDX6x chipset and requires different
firehose programmer file.
2023-01-05 17:39:13 +00:00
Ivan Mikhanchuk
d1fc1d1f93 modem-manager: add firehose prog name quirk
Adds FirehoseProgFile quirk to determine the correct filename for the
firehose prog depending on the device VID:PID.
2023-01-05 17:39:13 +00:00
Sean Rhodes
b20737fe4a plugins/flashrom: Allow 32MiB images for the StarBook Mk VI
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2023-01-05 14:57:58 +00:00
Mario Limonciello
c939db9296 trivial: skip self tests that fail with G_IO_ERROR_NOT_DIRECTORY
fixes: #5370
2023-01-05 09:20:35 +00:00
Martin Fernandez
7b6770061c trivial: fix error message on reading IA32_TME_ACTIVATION 2023-01-04 16:16:20 +00:00
Richard Hughes
2aca445360 trivial: Ensure that G_TEST_SRCDIR is set for all self tests
This means that we don't get hard-to-debug failures later in time.
2023-01-04 07:24:01 -06:00
Richard Hughes
6c18cc0f66 mtd: Use dummy SMBIOS data to fix self test on s390x 2023-01-04 07:24:01 -06:00