Commit Graph

9606 Commits

Author SHA1 Message Date
Richard Hughes
fb6315f1c6 trivial: Show the failing remote when using 'fwupdtool refresh' 2020-09-09 14:16:49 -05:00
Mario Limonciello
87b46a1ce1 releasing package fwupd version 1.4.6-1 2020-09-09 10:37:44 -05:00
Richard Hughes
49b911f094 nvme: Do not dedupe NVMe devices
Fixes https://github.com/fwupd/fwupd/issues/2366
2020-09-09 16:27:16 +01:00
Richard Hughes
af53a4fc22 vli: Do not dedupe USB hub PD devices
This object derives from FuDevice rather than FuVliDevice and so does not
inherit the NO_GUID_MATCHING flag like other devices.

Fixes https://github.com/fwupd/fwupd/issues/2364
2020-09-09 16:27:16 +01:00
Mario Limonciello
c86ec1e2f0 New upstream version (1.4.6) 2020-09-09 09:30:27 -05:00
Mario Limonciello
2f4caa7365 Release fwupd 1.4.6
-----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEEFj61ARkiXbPfj0nqF6y6jfqXDhcFAl9WArUUHHJpY2hhcmRA
 aHVnaHNpZS5jb20ACgkQF6y6jfqXDhcAxwf/ezAPuQLHq0dqa+ZZbN0EeXXThoGT
 2NVfYau/cmlY6pIBDUMpYl6xzKXXubusNxX7tobUociNXGhs2tzmGkWWesulVv+q
 LYRlpBPRwOvSMeDWb8wliZXvRlEGLxK97NaHTS/S0GesNKceZP0DB7KJUsFIV2A1
 ghSUXn1Q/cddFKAWKKy4H0abydItywRrLnvOZjtpo4nHiLC/s59JLptIYaC6JlfK
 px6uftHdifcFGJRetjAo3VvD6blbkZj2PW3GwUwOVbV7CvRiv3AhZLswLLvePXWr
 eB77myG2pDF9DlqMM9kxUdKcvGFVOe2OOqn12BuNU+O1rKhnQ1iprQZorA==
 =S0z+
 -----END PGP SIGNATURE-----

Merge tag '1.4.6' into debian

Release fwupd 1.4.6
2020-09-09 09:26:01 -05:00
Mario Limonciello
110eb286bc Make TPM more optional (Fixes: #2360)
- Rename the `plugin_tpm` option to `tpm` and when it's disabled
remove TPM support from all plugins
- If enabled then require the TSS to be installed
2020-09-08 15:16:58 -05:00
Richard Hughes
d19aff3df1 mei: Do not attempt to parse HFSTS6 when using TXT
It seems the MEI parameters are not set for platforms such as Apollo Lake.
The only bit set was FPF_SOC_LOCK, with the others all cleared to zero.

Fixes https://github.com/fwupd/fwupd/issues/2335 for a peculiar definition of 'fix'.
2020-09-08 17:05:02 +01:00
Richard Hughes
45fbc50f8d mei: Document some more of HFSTS6 2020-09-08 17:05:02 +01:00
Richard Hughes
9b688d0b73 trivial: Set FWUPD_STATUS_DECOMPRESSING when preparing firmware
This avoids the plugins forgetting to do it themselves.
2020-09-08 14:18:46 +01:00
Richard Hughes
fbe3304420 trivial: Remove the anti-pattern where plugins check the firmware size
This is already done in fu_device_prepare_firmware() and so is completely
redundant.
2020-09-08 14:18:46 +01:00
Richard Hughes
581aa3c0be elantp: Support more hardware types
Read the pattern from the hardware rather than hardcoding and support bigger
page sizes for later hardware versions.
2020-09-07 20:46:52 +01:00
Richard Hughes
5b13dec2e0 Release fwupd 1.4.6 2020-09-07 10:51:49 +01:00
Jerry Zhang
c263f1689f dfu: Allow device to attach to normal without a bus reset
As described in DFU protocol (7. Manifestation Phase), after the
firmware reprogramming is done, if bitWillDetach = 1, it doesn't
require the host to issue a USB bus reset, but the device can
generate a detach-attach sequence itself to go back to normal.

Add a quirk flag "no-bus-reset-attach" to skip the bus reset in
dfu_device_attach(), and increase the "RemoveDelay" as well.
2020-09-06 14:33:57 +01:00
Richard Hughes
5382e14158 trivial: Use the same indent size when appending key values 2020-09-06 14:33:43 +01:00
Richard Hughes
a6ca4ce85b Use the FuUdevDevice ->to_string() output
Print the sysfs path for devices deriving from FuUdevDevice, which also allows
us to use FU_UDEV_DEVICE_DEBUG without monkey-patching the plugins that also
define a device_class->to_string() vfunc.
2020-09-06 14:33:34 +01:00
Richard Hughes
7a7a39684f trivial: Only use FU_UDEV_DEVICE_FLAG_VENDOR_FROM_PARENT as a fallback
If the device node actually provides a vendor string, always use that before
falling back. The flag was initially designed to fall back in the event the NVMe
device does not declare a valid sysfs vendor ID.
2020-09-06 14:33:23 +01:00
Richard Hughes
038b88cb1f Fall back from ID_VENDOR_FROM_DATABASE to ID_VENDOR for NVMe devices 2020-09-06 14:33:16 +01:00
Jerry Zhang
b7beaf1f01 dfu: Specify "RemoveDelay" for Poly USB Cameras in dfu.quirk
For some Poly USB Cameras, it takes a longer time than the
default (FU_DEVICE_REMOVE_DELAY_RE_ENUMERATE) for being detached
to DFU or attached to normal mode. Need to specify the timeout in
"RemoveDelay" quirk key.

Also replace the hard-coded timeout with fu_device_get_remove_delay()
in dfu-tool.c.
2020-09-06 14:32:58 +01:00
Richard Hughes
60c754fc8c Cancel the file monitor before disposal to avoid a potential deadlock
Fixes https://github.com/fwupd/fwupd/issues/2350
2020-09-06 14:32:58 +01:00
Jerry Zhang
6cf0f93fdd dfu: Support polling the status from device in dfuManifest state
Some devices may accumulate the firmware image and perform the
entire reprogramming operation at one time. In this case, the
device enters dfuMANIFEST-SYNC or dfuMANIFEST state after
dfuDNLOAD-IDLE.

The fwupd shall be able to poll the status from the device via
DFU_GETSTATUS until the device completes the reprogramming or
reports an error.

For details, please refer to Section 7. Manifestation Phase and
A.1 Interface State Transition Diagram in the USB DFU protocol.
https://www.usb.org/sites/default/files/DFU_1.1.pdf

For not affecting the other DFU capable devices, introduce a quirk
"manifest-poll" to limit the logic.
2020-09-06 14:32:58 +01:00
Richard Hughes
7c8000fb92 Use newer libxmlb features to properly display more AppStream markup 2020-09-06 14:32:58 +01:00
Richard Hughes
92d4e635ac trivial: Fix a logic thinko spotted by Coverity 2020-09-06 14:32:58 +01:00
Richard Hughes
91d483dffd trivial: Fix some dead code as-seen by Coverity 2020-09-06 14:32:58 +01:00
Richard Hughes
1f56502932 trivial: Fix a copy paste mistake spotted by Coverity 2020-09-06 14:32:58 +01:00
Jan Tojnar
416df3d8e9 build: fix systemd_root_prefix for systemd 246
systemd 246 replaced the variable names (4908de44b0).
The old ones are kept for backwards compatibility but some of them interpolate new variable names so redefining them breaks.
Curiously, only systemdshutdowndir is affected by that here.
2020-09-06 14:29:05 +01:00
Jerry Zhang
51dd483088 dfu: Support download of large DFU firmware
The nr_chunks is defined as an unsigned short, the max value is
65536. Assume the transfer_size reported by device is 4096, the
maximum size of DFU firmware supported is 65536 * 4096 = 256MB.

To support larger DFU firmware, we can change the guint16 to
guint32.
2020-09-06 14:28:53 +01:00
Benson Leung
c92e422935 Disable gusb:tests 2020-09-06 14:28:43 +01:00
Mario Limonciello
786375e014 trivial: only run scan-build if compiler is clang 2020-09-06 14:28:00 +01:00
Mario Limonciello
c0e2334d5b trivial: disable gusb self tests for ubuntu 2020-09-06 14:27:49 +01:00
Richard Hughes
4227812f7f trivial: Fix segfault when xmlb cache cannot be written 2020-09-06 14:27:39 +01:00
Mario Limonciello
378c94fd3b trivial: dell-dock: check for valid dock type on open
Only add instance ID if it actually probes properly.

Otherwise this makes an invalid assumption that the device is a WD19
EC just because it had the correct hub in front.

Instead check the first time it's opened that the correct device
is identified (`EXPECTED_DOCK_TYPE`)
2020-09-06 14:27:21 +01:00
Richard Hughes
421d32b885 Fix building GUsb as a subproject with introspection enabled 2020-09-06 14:27:21 +01:00
Richard Hughes
5f8a463b44 trivial: Update the CI to Fedora 32 and drop various workarounds 2020-09-06 14:27:21 +01:00
Mario Limonciello
7d652d4ef7 trivial: debian: don't fail CI for subprojects 2020-09-06 14:27:21 +01:00
Richard Hughes
5ad1afd081 trivial: Fix two translator comment typos 2020-09-06 14:27:21 +01:00
Richard Hughes
f0240a5158 Install the new dbx utility as fwupdbxtool 2020-09-06 14:27:21 +01:00
Jerry Zhang
ae7563d7d7 dfu: Allow device to attach to normal without a bus reset
As described in DFU protocol (7. Manifestation Phase), after the
firmware reprogramming is done, if bitWillDetach = 1, it doesn't
require the host to issue a USB bus reset, but the device can
generate a detach-attach sequence itself to go back to normal.

Add a quirk flag "no-bus-reset-attach" to skip the bus reset in
dfu_device_attach(), and increase the "RemoveDelay" as well.
2020-09-04 17:52:00 +01:00
Richard Hughes
2506dbff6f trivial: Use the same indent size when appending key values 2020-09-03 16:50:41 +01:00
Richard Hughes
9a07407401 Use the FuUdevDevice ->to_string() output
Print the sysfs path for devices deriving from FuUdevDevice, which also allows
us to use FU_UDEV_DEVICE_DEBUG without monkey-patching the plugins that also
define a device_class->to_string() vfunc.
2020-09-03 16:50:41 +01:00
Richard Hughes
ecb4d1416d trivial: Only use FU_UDEV_DEVICE_FLAG_VENDOR_FROM_PARENT as a fallback
If the device node actually provides a vendor string, always use that before
falling back. The flag was initially designed to fall back in the event the NVMe
device does not declare a valid sysfs vendor ID.
2020-09-03 16:50:41 +01:00
Richard Hughes
82f9a85201 Fall back from ID_VENDOR_FROM_DATABASE to ID_VENDOR for NVMe devices 2020-09-03 16:50:41 +01:00
Richard Hughes
7c8a830659 libfwupd: Add async versions of the library for GUI tools
Rather than force the GUI to interact with fwupd using threads, provide
async versions so thay can be run without blocking the UI thread.
2020-09-03 15:46:57 +01:00
Jerry Zhang
9f31bc22df dfu: Specify "RemoveDelay" for Poly USB Cameras in dfu.quirk
For some Poly USB Cameras, it takes a longer time than the
default (FU_DEVICE_REMOVE_DELAY_RE_ENUMERATE) for being detached
to DFU or attached to normal mode. Need to specify the timeout in
"RemoveDelay" quirk key.

Also replace the hard-coded timeout with fu_device_get_remove_delay()
in dfu-tool.c.
2020-09-02 12:01:46 -05:00
Richard Hughes
a018b3cbb4 Do not return HSI attributes when running in a VM or container 2020-09-01 21:00:55 +01:00
Richard Hughes
0b6f58394b Cancel the file monitor before disposal to avoid a potential deadlock
Fixes https://github.com/fwupd/fwupd/issues/2350
2020-09-01 20:59:56 +01:00
Jerry Zhang
409a2c958c dfu: Support polling the status from device in dfuManifest state
Some devices may accumulate the firmware image and perform the
entire reprogramming operation at one time. In this case, the
device enters dfuMANIFEST-SYNC or dfuMANIFEST state after
dfuDNLOAD-IDLE.

The fwupd shall be able to poll the status from the device via
DFU_GETSTATUS until the device completes the reprogramming or
reports an error.

For details, please refer to Section 7. Manifestation Phase and
A.1 Interface State Transition Diagram in the USB DFU protocol.
https://www.usb.org/sites/default/files/DFU_1.1.pdf

For not affecting the other DFU capable devices, introduce a quirk
"manifest-poll" to limit the logic.
2020-09-01 19:43:55 +01:00
Richard Hughes
7286951771 Use newer libxmlb features to properly display more AppStream markup 2020-09-01 16:11:50 +01:00
Richard Hughes
f0735f4583 trivial: Fix a logic thinko spotted by Coverity 2020-09-01 14:14:02 +01:00
Richard Hughes
241bdbb0f5 trivial: Fix some dead code as-seen by Coverity 2020-09-01 14:12:27 +01:00