diff --git a/plugins/synaptics-mst/fu-self-test.c b/plugins/synaptics-mst/fu-self-test.c index bac35da26..f0b55a973 100644 --- a/plugins/synaptics-mst/fu-self-test.c +++ b/plugins/synaptics-mst/fu-self-test.c @@ -31,6 +31,11 @@ _test_add_fake_devices_from_dir(FuPlugin *plugin, const gchar *path) g_autoptr(GDir) dir = g_dir_open(path, 0, &error); g_assert_no_error(error); g_assert_nonnull(dir); + + ret = fu_context_load_quirks(ctx, FU_QUIRKS_LOAD_FLAG_NO_CACHE, &error); + g_assert_no_error(error); + g_assert(ret); + while ((basename = g_dir_read_name(dir)) != NULL) { g_autofree gchar *fn = g_build_filename(path, basename, NULL); g_autoptr(FuUdevDevice) dev = NULL; @@ -69,6 +74,10 @@ fu_plugin_synaptics_mst_none_func(void) g_autofree gchar *pluginfn = NULL; g_autofree gchar *filename = NULL; + ret = fu_context_load_quirks(ctx, FU_QUIRKS_LOAD_FLAG_NO_CACHE, &error); + g_assert_no_error(error); + g_assert(ret); + g_signal_connect(plugin, "device-added", G_CALLBACK(_plugin_device_added_cb), &devices); pluginfn = g_test_build_filename(G_TEST_BUILT, "libfu_plugin_synaptics_mst." G_MODULE_SUFFIX, @@ -107,6 +116,10 @@ fu_plugin_synaptics_mst_tb16_func(void) g_autofree gchar *pluginfn = NULL; g_autofree gchar *filename = NULL; + ret = fu_context_load_quirks(ctx, FU_QUIRKS_LOAD_FLAG_NO_CACHE, &error); + g_assert_no_error(error); + g_assert(ret); + g_signal_connect(plugin, "device-added", G_CALLBACK(_plugin_device_added_cb), &devices); pluginfn = g_test_build_filename(G_TEST_BUILT, "libfu_plugin_synaptics_mst." G_MODULE_SUFFIX, diff --git a/plugins/synaptics-mst/fu-synaptics-mst-device.c b/plugins/synaptics-mst/fu-synaptics-mst-device.c index 1eb92e3b4..33bd36376 100644 --- a/plugins/synaptics-mst/fu-synaptics-mst-device.c +++ b/plugins/synaptics-mst/fu-synaptics-mst-device.c @@ -1394,6 +1394,14 @@ fu_synaptics_mst_device_rescan(FuDevice *device, GError **error) self->board_id); fu_device_add_instance_id(FU_DEVICE(self), dock_id2); } + } else { + /* devices are explicit opt-in */ + g_set_error(error, + FWUPD_ERROR, + FWUPD_ERROR_NOT_SUPPORTED, + "ignoring %s device with no SynapticsMstDeviceKind quirk", + guid0); + return FALSE; } /* detect chip family */ diff --git a/plugins/synaptics-mst/synaptics-mst.quirk b/plugins/synaptics-mst/synaptics-mst.quirk index 1405d83ed..678c201a1 100644 --- a/plugins/synaptics-mst/synaptics-mst.quirk +++ b/plugins/synaptics-mst/synaptics-mst.quirk @@ -40,15 +40,15 @@ Name = Dell Rugged Platform SynapticsMstDeviceKind = system # ThinkPad Workstation Dock -[MST-tesla-vmm2322-513] +[MST-513] ParentGuid = USB\VID_17EF&PID_305A +SynapticsMstDeviceKind = dock # ThinkPad Thunderbolt 3 Workstation Dock -[MST-panamera-vmm5322-595] +[MST-595] ParentGuid = TBT-01081720 +SynapticsMstDeviceKind = dock [MST-596] Name = ThinkPad USB-C Dock Gen2 - -[MST-596] -Name = ThinkPad USB-C Dock Gen2 +SynapticsMstDeviceKind = dock