parent
68c67d816d
commit
17757850c5
@ -1,110 +0,0 @@
|
|||||||
From 90e5a58736645cdd37bf4c63f9a4056951dfb3f2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Richard Hughes <richard@hughsie.com>
|
|
||||||
Date: Tue, 24 Jan 2023 09:52:17 +0000
|
|
||||||
Subject: [PATCH] Do not make any of the HWIDs setup failures fatal
|
|
||||||
|
|
||||||
It's perfectly okay to have no HWIDs defined.
|
|
||||||
|
|
||||||
Should help with https://github.com/fwupd/fwupd/issues/5402
|
|
||||||
---
|
|
||||||
libfwupdplugin/fu-context.c | 73 +++++++++++--------------------------
|
|
||||||
1 file changed, 21 insertions(+), 52 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libfwupdplugin/fu-context.c b/libfwupdplugin/fu-context.c
|
|
||||||
index 08618b435..11b4b1b38 100644
|
|
||||||
--- a/libfwupdplugin/fu-context.c
|
|
||||||
+++ b/libfwupdplugin/fu-context.c
|
|
||||||
@@ -767,6 +767,8 @@ fu_context_security_changed(FuContext *self)
|
|
||||||
g_signal_emit(self, signals[SIGNAL_SECURITY_CHANGED], 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
+typedef gboolean (*FuContextHwidsSetupFunc)(FuContext *self, FuHwids *hwids, GError **error);
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* fu_context_load_hwinfo:
|
|
||||||
* @self: a #FuContext
|
|
||||||
@@ -786,62 +788,29 @@ fu_context_load_hwinfo(FuContext *self, FuContextHwidFlags flags, GError **error
|
|
||||||
GPtrArray *guids;
|
|
||||||
g_autoptr(GError) error_hwids = NULL;
|
|
||||||
g_autoptr(GError) error_bios_settings = NULL;
|
|
||||||
+ struct {
|
|
||||||
+ const gchar *name;
|
|
||||||
+ FuContextHwidFlags flag;
|
|
||||||
+ FuContextHwidsSetupFunc func;
|
|
||||||
+ } hwids_setup_map[] = {{"config", FU_CONTEXT_HWID_FLAG_LOAD_CONFIG, fu_hwids_config_setup},
|
|
||||||
+ {"smbios", FU_CONTEXT_HWID_FLAG_LOAD_SMBIOS, fu_hwids_smbios_setup},
|
|
||||||
+ {"fdt", FU_CONTEXT_HWID_FLAG_LOAD_FDT, fu_hwids_fdt_setup},
|
|
||||||
+ {"kenv", FU_CONTEXT_HWID_FLAG_LOAD_KENV, fu_hwids_kenv_setup},
|
|
||||||
+ {"dmi", FU_CONTEXT_HWID_FLAG_LOAD_DMI, fu_hwids_dmi_setup},
|
|
||||||
+ {NULL, FU_CONTEXT_HWID_FLAG_NONE, NULL}};
|
|
||||||
|
|
||||||
g_return_val_if_fail(FU_IS_CONTEXT(self), FALSE);
|
|
||||||
g_return_val_if_fail(error == NULL || *error == NULL, FALSE);
|
|
||||||
|
|
||||||
- if ((flags & FU_CONTEXT_HWID_FLAG_LOAD_CONFIG) > 0) {
|
|
||||||
- g_autoptr(GError) error_local = NULL;
|
|
||||||
- if (!fu_hwids_config_setup(self, priv->hwids, &error_local)) {
|
|
||||||
- if (!g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED)) {
|
|
||||||
- g_propagate_prefixed_error(error,
|
|
||||||
- g_steal_pointer(&error_local),
|
|
||||||
- "Failed to load HWIDs config: ");
|
|
||||||
- return FALSE;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- if ((flags & FU_CONTEXT_HWID_FLAG_LOAD_DMI) > 0) {
|
|
||||||
- g_autoptr(GError) error_local = NULL;
|
|
||||||
- if (!fu_hwids_dmi_setup(self, priv->hwids, &error_local)) {
|
|
||||||
- if (!g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED)) {
|
|
||||||
- g_propagate_prefixed_error(error,
|
|
||||||
- g_steal_pointer(&error_local),
|
|
||||||
- "Failed to load HWIDs DMI: ");
|
|
||||||
- return FALSE;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- if ((flags & FU_CONTEXT_HWID_FLAG_LOAD_FDT) > 0) {
|
|
||||||
- g_autoptr(GError) error_local = NULL;
|
|
||||||
- if (!fu_hwids_fdt_setup(self, priv->hwids, &error_local)) {
|
|
||||||
- if (!g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED)) {
|
|
||||||
- g_propagate_prefixed_error(error,
|
|
||||||
- g_steal_pointer(&error_local),
|
|
||||||
- "Failed to load HWIDs FDT: ");
|
|
||||||
- return FALSE;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- if ((flags & FU_CONTEXT_HWID_FLAG_LOAD_KENV) > 0) {
|
|
||||||
- g_autoptr(GError) error_local = NULL;
|
|
||||||
- if (!fu_hwids_kenv_setup(self, priv->hwids, &error_local)) {
|
|
||||||
- if (!g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED)) {
|
|
||||||
- g_propagate_prefixed_error(error,
|
|
||||||
- g_steal_pointer(&error_local),
|
|
||||||
- "Failed to load HWIDs kenv: ");
|
|
||||||
- return FALSE;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- if ((flags & FU_CONTEXT_HWID_FLAG_LOAD_SMBIOS) > 0) {
|
|
||||||
- g_autoptr(GError) error_local = NULL;
|
|
||||||
- if (!fu_hwids_smbios_setup(self, priv->hwids, &error_local)) {
|
|
||||||
- if (!g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED)) {
|
|
||||||
- g_propagate_prefixed_error(error,
|
|
||||||
- g_steal_pointer(&error_local),
|
|
||||||
- "Failed to load SMBIOS: ");
|
|
||||||
- return FALSE;
|
|
||||||
+ /* run all the HWID setup funcs */
|
|
||||||
+ for (guint i = 0; hwids_setup_map[i].name != NULL; i++) {
|
|
||||||
+ if ((flags & hwids_setup_map[i].flag) > 0) {
|
|
||||||
+ g_autoptr(GError) error_local = NULL;
|
|
||||||
+ if (!hwids_setup_map[i].func(self, priv->hwids, &error_local)) {
|
|
||||||
+ g_debug("failed to load %s: %s",
|
|
||||||
+ hwids_setup_map[i].name,
|
|
||||||
+ error_local->message);
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
|||||||
From 19db23f9b8a64597564ce1b474eb6c384a57125f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Richard Hughes <richard@hughsie.com>
|
|
||||||
Date: Wed, 2 Nov 2022 09:31:53 +0000
|
|
||||||
Subject: [PATCH] Only include the 'attribute not exported' warning on debug
|
|
||||||
builds
|
|
||||||
|
|
||||||
End users are not really capable of fixing the root issue, and people seem
|
|
||||||
overly worried that something bad has gone wrong.
|
|
||||||
|
|
||||||
Fixes https://github.com/fwupd/fwupd/issues/5077
|
|
||||||
---
|
|
||||||
libfwupdplugin/fu-bios-settings.c | 2 +-
|
|
||||||
libfwupdplugin/fu-self-test.c | 2 ++
|
|
||||||
plugins/lenovo-thinklmi/fu-self-test.c | 2 ++
|
|
||||||
3 files changed, 5 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/libfwupdplugin/fu-bios-settings.c b/libfwupdplugin/fu-bios-settings.c
|
|
||||||
index 6151c8289..8ea1269d7 100644
|
|
||||||
--- a/libfwupdplugin/fu-bios-settings.c
|
|
||||||
+++ b/libfwupdplugin/fu-bios-settings.c
|
|
||||||
@@ -276,7 +276,7 @@ fu_bios_setting_set_type(FuBiosSettings *self, FwupdBiosSetting *attr, GError **
|
|
||||||
|
|
||||||
/* lenovo thinklmi seems to be missing it even though it's mandatory :/ */
|
|
||||||
if (!fu_bios_setting_get_key(attr, "type", &data, &error_key)) {
|
|
||||||
-#if GLIB_CHECK_VERSION(2, 64, 0)
|
|
||||||
+#if GLIB_CHECK_VERSION(2, 64, 0) && !defined(SUPPORTED_BUILD)
|
|
||||||
g_warning_once("KERNEL BUG: 'type' attribute not exported: (%s)",
|
|
||||||
error_key->message);
|
|
||||||
#else
|
|
||||||
diff --git a/libfwupdplugin/fu-self-test.c b/libfwupdplugin/fu-self-test.c
|
|
||||||
index c105fa271..c670b3a80 100644
|
|
||||||
--- a/libfwupdplugin/fu-self-test.c
|
|
||||||
+++ b/libfwupdplugin/fu-self-test.c
|
|
||||||
@@ -3117,7 +3117,9 @@ fu_bios_settings_load_func(void)
|
|
||||||
test_dir = g_test_build_filename(G_TEST_DIST, "tests", "bios-attrs", "lenovo-p620", NULL);
|
|
||||||
(void)g_setenv("FWUPD_SYSFSFWATTRIBDIR", test_dir, TRUE);
|
|
||||||
|
|
||||||
+#if GLIB_CHECK_VERSION(2, 64, 0) && !defined(SUPPORTED_BUILD)
|
|
||||||
g_test_expect_message("FuBiosSettings", G_LOG_LEVEL_WARNING, "*BUG*");
|
|
||||||
+#endif
|
|
||||||
ret = fu_context_reload_bios_settings(ctx, &error);
|
|
||||||
g_assert_no_error(error);
|
|
||||||
g_assert_true(ret);
|
|
||||||
diff --git a/plugins/lenovo-thinklmi/fu-self-test.c b/plugins/lenovo-thinklmi/fu-self-test.c
|
|
||||||
index 4777a2ae1..9e20a8cf5 100644
|
|
||||||
--- a/plugins/lenovo-thinklmi/fu-self-test.c
|
|
||||||
+++ b/plugins/lenovo-thinklmi/fu-self-test.c
|
|
||||||
@@ -39,7 +39,9 @@ fu_test_self_init(FuTest *self, GError **error_global)
|
|
||||||
g_autoptr(FuProgress) progress = fu_progress_new(G_STRLOC);
|
|
||||||
g_autoptr(GError) error = NULL;
|
|
||||||
|
|
||||||
+#if GLIB_CHECK_VERSION(2, 64, 0) && !defined(SUPPORTED_BUILD)
|
|
||||||
g_test_expect_message("FuBiosSettings", G_LOG_LEVEL_WARNING, "*KERNEL*BUG*");
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
ret = fu_context_load_quirks(ctx,
|
|
||||||
FU_QUIRKS_LOAD_FLAG_NO_CACHE | FU_QUIRKS_LOAD_FLAG_NO_VERIFY,
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
From af5fb429c8e726d1d7455b2d0e5d4263edbd4290 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ivan Mikhanchuk <ivanmikh@pm.me>
|
|
||||||
Date: Tue, 24 Jan 2023 17:06:09 -0800
|
|
||||||
Subject: [PATCH] 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.
|
|
||||||
---
|
|
||||||
plugins/modem-manager/fu-sahara-loader.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/plugins/modem-manager/fu-sahara-loader.c b/plugins/modem-manager/fu-sahara-loader.c
|
|
||||||
index 89c620fbe..78f24036f 100644
|
|
||||||
--- a/plugins/modem-manager/fu-sahara-loader.c
|
|
||||||
+++ b/plugins/modem-manager/fu-sahara-loader.c
|
|
||||||
@@ -206,7 +206,8 @@ fu_sahara_loader_close(FuSaharaLoader *self, GError **error)
|
|
||||||
gboolean
|
|
||||||
fu_sahara_loader_qdl_is_open(FuSaharaLoader *self)
|
|
||||||
{
|
|
||||||
- g_return_val_if_fail(self != NULL, FALSE);
|
|
||||||
+ if (self == NULL)
|
|
||||||
+ return FALSE;
|
|
||||||
|
|
||||||
return fu_usb_device_is_open(self->usb_device);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From 7f427d567d497048772bad59e098528605e563ce Mon Sep 17 00:00:00 2001
|
|
||||||
From: Richard Hughes <richard@hughsie.com>
|
|
||||||
Date: Mon, 23 Jan 2023 11:22:43 +0000
|
|
||||||
Subject: [PATCH] trivial: Fix build fix when using ppc64le system
|
|
||||||
|
|
||||||
---
|
|
||||||
src/meson.build | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/meson.build b/src/meson.build
|
|
||||||
index b9f6736f2..f3ca734ee 100644
|
|
||||||
--- a/src/meson.build
|
|
||||||
+++ b/src/meson.build
|
|
||||||
@@ -197,6 +197,7 @@ plugins_hdr = custom_target('fwupd-generate-plugins-header',
|
|
||||||
fwupdengine = library(
|
|
||||||
'fwupdengine',
|
|
||||||
resources_src,
|
|
||||||
+ plugins_hdr,
|
|
||||||
sources: fwupd_engine_src,
|
|
||||||
install: true,
|
|
||||||
install_rpath: libdir_pkg,
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
From 8076090a000d4adde59fddeadb17a6f769993d1e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jason Gerecke <killertofu@gmail.com>
|
|
||||||
Date: Tue, 17 Jan 2023 14:24:14 -0800
|
|
||||||
Subject: [PATCH] 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>
|
|
||||||
---
|
|
||||||
plugins/wacom-usb/fu-wac-device.c | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/plugins/wacom-usb/fu-wac-device.c b/plugins/wacom-usb/fu-wac-device.c
|
|
||||||
index 9162d19a9..714761b1e 100644
|
|
||||||
--- a/plugins/wacom-usb/fu-wac-device.c
|
|
||||||
+++ b/plugins/wacom-usb/fu-wac-device.c
|
|
||||||
@@ -182,7 +182,8 @@ fu_wac_device_set_feature_report(FuWacDevice *self,
|
|
||||||
buf,
|
|
||||||
bufsz,
|
|
||||||
FU_WAC_DEVICE_TIMEOUT,
|
|
||||||
- flags | FU_HID_DEVICE_FLAG_IS_FEATURE,
|
|
||||||
+ flags | FU_HID_DEVICE_FLAG_IS_FEATURE |
|
|
||||||
+ FU_HID_DEVICE_FLAG_RETRY_FAILURE,
|
|
||||||
error);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -920,6 +921,7 @@ fu_wac_device_init(FuWacDevice *self)
|
|
||||||
fu_device_set_install_duration(FU_DEVICE(self), 10);
|
|
||||||
fu_device_set_remove_delay(FU_DEVICE(self), FU_DEVICE_REMOVE_DELAY_RE_ENUMERATE);
|
|
||||||
fu_device_set_firmware_gtype(FU_DEVICE(self), FU_TYPE_WAC_FIRMWARE);
|
|
||||||
+ fu_device_retry_set_delay(FU_DEVICE(self), 30); /* ms */
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue