mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-12 03:55:27 +00:00
synaptics-mst: Only probe devices that have opted-in
Fixes https://github.com/fwupd/fwupd/issues/3701
This commit is contained in:
parent
d4fb04d6fc
commit
11bcf2677c
@ -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_autoptr(GDir) dir = g_dir_open(path, 0, &error);
|
||||||
g_assert_no_error(error);
|
g_assert_no_error(error);
|
||||||
g_assert_nonnull(dir);
|
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) {
|
while ((basename = g_dir_read_name(dir)) != NULL) {
|
||||||
g_autofree gchar *fn = g_build_filename(path, basename, NULL);
|
g_autofree gchar *fn = g_build_filename(path, basename, NULL);
|
||||||
g_autoptr(FuUdevDevice) dev = 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 *pluginfn = NULL;
|
||||||
g_autofree gchar *filename = 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);
|
g_signal_connect(plugin, "device-added", G_CALLBACK(_plugin_device_added_cb), &devices);
|
||||||
pluginfn = g_test_build_filename(G_TEST_BUILT,
|
pluginfn = g_test_build_filename(G_TEST_BUILT,
|
||||||
"libfu_plugin_synaptics_mst." G_MODULE_SUFFIX,
|
"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 *pluginfn = NULL;
|
||||||
g_autofree gchar *filename = 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);
|
g_signal_connect(plugin, "device-added", G_CALLBACK(_plugin_device_added_cb), &devices);
|
||||||
pluginfn = g_test_build_filename(G_TEST_BUILT,
|
pluginfn = g_test_build_filename(G_TEST_BUILT,
|
||||||
"libfu_plugin_synaptics_mst." G_MODULE_SUFFIX,
|
"libfu_plugin_synaptics_mst." G_MODULE_SUFFIX,
|
||||||
|
@ -1394,6 +1394,14 @@ fu_synaptics_mst_device_rescan(FuDevice *device, GError **error)
|
|||||||
self->board_id);
|
self->board_id);
|
||||||
fu_device_add_instance_id(FU_DEVICE(self), dock_id2);
|
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 */
|
/* detect chip family */
|
||||||
|
@ -40,15 +40,15 @@ Name = Dell Rugged Platform
|
|||||||
SynapticsMstDeviceKind = system
|
SynapticsMstDeviceKind = system
|
||||||
|
|
||||||
# ThinkPad Workstation Dock
|
# ThinkPad Workstation Dock
|
||||||
[MST-tesla-vmm2322-513]
|
[MST-513]
|
||||||
ParentGuid = USB\VID_17EF&PID_305A
|
ParentGuid = USB\VID_17EF&PID_305A
|
||||||
|
SynapticsMstDeviceKind = dock
|
||||||
|
|
||||||
# ThinkPad Thunderbolt 3 Workstation Dock
|
# ThinkPad Thunderbolt 3 Workstation Dock
|
||||||
[MST-panamera-vmm5322-595]
|
[MST-595]
|
||||||
ParentGuid = TBT-01081720
|
ParentGuid = TBT-01081720
|
||||||
|
SynapticsMstDeviceKind = dock
|
||||||
|
|
||||||
[MST-596]
|
[MST-596]
|
||||||
Name = ThinkPad USB-C Dock Gen2
|
Name = ThinkPad USB-C Dock Gen2
|
||||||
|
SynapticsMstDeviceKind = dock
|
||||||
[MST-596]
|
|
||||||
Name = ThinkPad USB-C Dock Gen2
|
|
||||||
|
Loading…
Reference in New Issue
Block a user