From 0f057d227b704d7c2bb90fb4ddb438fcf89a42ef Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Fri, 11 Sep 2020 15:43:51 -0500 Subject: [PATCH] thunderbolt: if calling activate always use nvm_authenticate (#2374) This will force the update to complete on logout or shutdown --- plugins/thunderbolt/fu-thunderbolt-device.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/thunderbolt/fu-thunderbolt-device.c b/plugins/thunderbolt/fu-thunderbolt-device.c index de106aac7..494bbef07 100644 --- a/plugins/thunderbolt/fu-thunderbolt-device.c +++ b/plugins/thunderbolt/fu-thunderbolt-device.c @@ -502,6 +502,14 @@ fu_thunderbolt_device_setup (FuDevice *device, GError **error) return fu_thunderbolt_device_setup_controller (device, error); } +static gboolean +fu_thunderbolt_device_activate (FuDevice *device, GError **error) +{ + FuUdevDevice *udev = FU_UDEV_DEVICE (device); + + return fu_udev_device_write_sysfs (udev, "nvm_authenticate", "1", error); +} + static gboolean fu_thunderbolt_device_authenticate (FuDevice *device, GError **error) { @@ -786,7 +794,7 @@ fu_thunderbolt_device_class_init (FuThunderboltDeviceClass *klass) FuDeviceClass *klass_device = FU_DEVICE_CLASS (klass); FuUdevDeviceClass *klass_udev_device = FU_UDEV_DEVICE_CLASS (klass); object_class->finalize = fu_thunderbolt_device_finalize; - klass_device->activate = fu_thunderbolt_device_authenticate; + klass_device->activate = fu_thunderbolt_device_activate; klass_udev_device->to_string = fu_thunderbolt_device_to_string; klass_device->setup = fu_thunderbolt_device_setup; klass_device->prepare_firmware = fu_thunderbolt_device_prepare_firmware;