Commit Graph

6025 Commits

Author SHA1 Message Date
Mario Limonciello
cfd584f26b trivial: build-windows: fix some shellcheck warnings 2021-08-18 07:58:17 -05:00
Mario Limonciello
4f36ec32e8 trivial: freebsd: remove unused variable
found by codacity
2021-08-18 07:58:17 -05:00
Mario Limonciello
cedc772b91 trivial: redfish: remove duplicate dictionary key
found by codacity
2021-08-18 07:58:17 -05:00
Mario Limonciello
393777b9fb trivial: redfish: drop unused import and variables
found by codacity
2021-08-18 07:58:17 -05:00
Mario Limonciello
a1b746d276 trivial: don't use built-in types
found by codacity
2021-08-18 07:58:17 -05:00
Mario Limonciello
747aeb5f8a trivial: uefi-capsule: remove an always true condition
found by codacity
2021-08-18 07:58:17 -05:00
Jerry Zhang
dfc0254683 dfu: Introduct a quirk to allow zero polltimeout in dfuDNLOAD.
Some Poly usb devices report zero in the bwPollTimeout field of
GET_STATUS request. The host can issue the next DFU_DNLOAD
request immediately without any delay.

Introduced a private flag to skip the default DNLOAD timeout
(5ms) fix. It could remarkably reduce the firmware downloading
time taking into account the large firmware (more than 500MB).
2021-08-16 10:01:27 -05:00
Emily Miller
89609c8c1b vli: VL819 into quirk 2021-08-13 10:48:38 -05:00
Mario Limonciello
1c25453aa8 trivial: contrib/setup: update markdown if it's too old
gi-docgen requires 3.3.3 or later, but some of the distro packages
are too old.  Upgrade them to make the default

```
meson build
```

work out of the box
2021-08-12 16:38:14 -05:00
Twain Byrnes
84b06ed258 migrate powerd plugin from method call to signal
Allow fwupd to use the BatteryStatePoll signal instead
of the GetBatteryState method call so that fwupd does
not need to run a timer itself and is automatically updated
on power connect/disconnect.

Change-Id: I81aad6a5933fa267473a83d1b97f4638235b155a
2021-08-12 17:01:13 +01:00
Emily Miller
5d337e72a6 vli: fix VL819, add placeholder VL821-VL822 2021-08-11 10:11:14 -05:00
cragw
f5fb53a371
trivial: if usb4 device device presents then activate it exclusively (#3595)
* dell-dock: open usb4 device in the activate call, and leave early

* trivial: read history earlier, at least before plugin register

* dell-dock: activate usb4 device exclusively if it needs activation
2021-08-11 22:29:31 +08:00
Richard Hughes
6f8ab5e70c Restart the daemon if any of the the plugin config files are modified
Fixes https://github.com/fwupd/fwupd/issues/3625
2021-08-11 14:27:47 +01:00
Richard Hughes
fb234f3d04 trivial: Show the UpdateError if the device is not UPDATABLE 2021-08-11 10:54:38 +01:00
Richard Hughes
486f793df7 Recalculate the device inhibits when the flags property changes
Fixes https://github.com/fwupd/fwupd/issues/3622
2021-08-11 10:54:38 +01:00
Richard Hughes
bc759d0584 Fix cleanup and plugin to have the correct args order
All the other vfuncs have 'plugin, device, flags' but prepare and
cleanup vfuncs being 'plugin, flags, device' order has been triggering
my OCD for the last few years.

We've just broken the symbol names, so it's the right time to fix this.
2021-08-10 09:57:49 +01:00
Mario Limonciello
37e06fff1c trivial: bump 1.6.3->1.7.0 2021-08-09 10:24:54 -05:00
Jarvis-Jiang-G
cc388dba5a modem-manager: Fix the report that failed to get device after update
Module may not have been re-probed and exposed in MM when the FW version was successfully obtained, which leads to the report that failed to get device after update. In fact, FW has been uodated successfully, it needs to add 150s to wait for the module to be re-probed and exposed in MM.

Signed-off-by: Jarvis Jiang <jarvis.w.jiang@gmail.com>
2021-08-09 10:19:45 -05:00
Richard Hughes
09770c60f0 trivial: Fork for 1_6_X 2021-08-09 09:24:03 +01:00
Mario Limonciello
0114c9ada7 trivial: check-license: ignore subprojects too 2021-08-08 19:44:33 -05:00
Mario Limonciello
1384e94c64 trivial: check-license: detect and ignore build directory
Find the build directory by finding `config.h`
2021-08-08 15:41:43 -05:00
Mario Limonciello
28a04c7c78 trivial: check-license: rename license variable to lic
license is a built-in.
caught by codacity.
2021-08-08 15:41:43 -05:00
Mario Limonciello
915916e22a Add a pre-commit rule to verify a SPDX license header is present 2021-08-08 14:43:21 -05:00
Mario Limonciello
9c35617b54 trivial: out-of-tree: add SPDX license headers 2021-08-08 14:43:21 -05:00
Mario Limonciello
4ff6a6dedb trivial: flashrom: Add SPDX license header
Clarify that the license was intended to be LGPL2.1 when the project
adjusted and this source file was just missed as well.
2021-08-08 14:43:21 -05:00
Jeremy Bopp
3604b897b5 Fix detection of 8Bitdo wireless usb adapter
Limits copying the get version response payload to the size of the out buffer.
Devices that return a larger payload pack the necessary version information at
the beginning of the payload.

Fixes: #1661
2021-08-07 21:51:26 -05:00
Richard Hughes
e44ec2f0e4 trivial: Do not show superset plugin warnings when disabled 2021-08-06 20:51:22 +01:00
Richard Hughes
ad24f1623d redfish: Also conflict with the bios plugin when required 2021-08-06 20:51:22 +01:00
Richard Hughes
d4a4362621 redfish: Fix writing large firmware files 2021-08-06 20:51:22 +01:00
Richard Hughes
f5c0eab25d redfish: Add a per-vendor quirk to set all devices as requiring a reboot
Some versions of XCC do not send the Base.1.10.ResetRequired message.
2021-08-06 20:51:22 +01:00
Richard Hughes
f42b44e427 Remove some deprecated API 2021-08-06 19:49:53 +01:00
Richard Hughes
a5a978b3f6 Rename some confusing API
More than one person has asked about 'why call fu_plugin_update() for a
reinstall or downgrade' and I didn't have a very good answer.

The plugin API is not officially stable, and we should fix things to be
less confusing. Use the same verbs as the FuDevice vfuncs instead.
2021-08-06 19:49:53 +01:00
Peter Marheine
059f56e6ce realtek-mst: add support for RTD2141B
The RTD2141B has the same update protocol as RTD2142, but the Chromebook
targets that use it require us to find the drm_dp_aux_dev i2c channel
differently because the AMD display driver doesn't give each output a
unique name in sysfs, so it must be found by walking sysfs from the drm
device representing an output.

Change-Id: Icb6c1a40b8a62af72808d68a0a69555810abc272
2021-08-06 11:00:35 +10:00
Ricardo Cañuelo
14d21c941c trivial: Allow handling EPROTO in plugins
Signed-off-by: Richard Hughes <richard@hughsie.com>
2021-08-05 15:46:06 +01:00
Ricardo Cañuelo
7b18e593ea trivial: Ignore NUL chars in the device version
Signed-off-by: Richard Hughes <richard@hughsie.com>
2021-08-05 14:22:15 +01:00
Richard Hughes
2815a30274 elantp: Fix a crash when starting the daemon
FuElantpHidDevice derives from FuUdevDevice, not FuUsbDevice -- and the
former does not define a class->setup vfunc.

Fixes https://github.com/fwupd/fwupd/issues/3548
2021-08-05 12:54:17 +01:00
Richard Hughes
51efc1c772 trivial: Disable the FreeBSD CI action as it's been failing for a long time 2021-08-05 08:35:54 +01:00
Richard Hughes
068cff6111 test: Allow setting plugin parameters using an environment variable
Based on a patch by Twain Byrnes <binarynewts@google.com>, many thanks.

Use this to test:

sudo FWUPD_TEST_PLUGIN_XML="<config><delay_decompress_ms>100</delay_decompress_ms></config>" \
./src/fwupdtool --plugins test get-devices -v
2021-08-05 08:12:58 +01:00
Thomas Deutschmann
9e4d1bc73b dell-dock plugin requires gusb
Closes: https://github.com/fwupd/fwupd/issues/3598
2021-08-04 18:19:09 +01:00
Thomas Deutschmann
bd6adc8beb modem-manager: Fix compiling with old versions of libxmlb
Closes: https://github.com/fwupd/fwupd/issues/3600
2021-08-04 18:16:18 +01:00
Jerry Zhang
0776918dd8 dfu: Add support for Poly Studio P21 usb device
Specify the Flags in dfu.qurik for Poly Studio P21's camera.
2021-08-04 17:27:11 +01:00
Richard Hughes
12842fdfce Fall back to the parent if the child does not have a battery level set 2021-08-04 09:29:02 +01:00
Twain Byrnes
eed815331c Inhibit system suspend during update
Create and destroy /run/lock/power_override/fwupd.lock.
This file will hold the contents of getpid (), which will
stop the device from being suspended while the file exists.
The file will be created and written just before the
update is put into motion and be destroyed once the update
finishes, or upon restart in case of catastrophic failure.

Change-Id: If8dd17b0358862a842c9589e11ed0de12d852797
2021-08-04 08:33:57 +01:00
8BitDo
c381b334eb 8bitdo: Fix N30 Pro 2 install duration 2021-08-03 18:35:07 +01:00
Richard Hughes
05c1f2b1f3 trivial: Fix docgen warning that crept in with FwupdRequest 2021-08-03 17:33:21 +01:00
Richard Hughes
7a1d547128 trivial: Do not set up the backends if there is no coldplug
This speeds up fu-self-test, but more importantly fixes a intermittent
'ninja check' failure when a host USB device disconnects at exactly the
wrong time.

The FuUsbBackend code is unusual in that the setup() code sets up a
context (with a thread) which takes up to 2 seconds to timeout.
2021-08-03 17:04:27 +01:00
Richard Hughes
8f19ea75d3 Sanitize the device name harder 2021-08-03 15:45:37 +01:00
Richard Hughes
7cfbea795c redfish: Allow starting when using RestrictAddressFamilies 2021-08-03 15:45:15 +01:00
Richard Hughes
27fbab1990 redfish: Disable the uefi_capsule plugin if coldplug succeeded
We don't want to show the big warning about the missing ESRT on server
hardware that is managed by a BMC:

    WARNING: UEFI capsule updates not available or enabled in firmware setup
      See https://github.com/fwupd/fwupd/wiki/PluginFlag:capsules-unsupported for more information.
2021-08-03 13:10:10 +01:00
Richard Hughes
9b49e7b83b trivial: post release version bump 2021-08-02 15:22:43 +01:00