Skip to content

Commit

Permalink
Do not probe the BOS descriptors of the Nostromo n52 gamepad
Browse files Browse the repository at this point in the history
Fixes #6871
  • Loading branch information
hughsie committed Mar 11, 2024
1 parent d6a83e4 commit 41ddd62
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data/ds20.quirk
@@ -0,0 +1,3 @@
# Nostromo n52 gamepad
[USB\VID_050D&PID_0815]
Flags = no-probe
1 change: 1 addition & 0 deletions data/meson.build
Expand Up @@ -30,6 +30,7 @@ if build_standalone
install_mode: 'rw-r-----',
)
plugin_quirks += files([
'ds20.quirk',
'power.quirk',
'cfi.quirk',
])
Expand Down
6 changes: 6 additions & 0 deletions libfwupdplugin/fu-usb-device.c
Expand Up @@ -689,6 +689,12 @@ fu_usb_device_probe_bos_descriptors(FuUsbDevice *self, GError **error)
g_autoptr(GError) error_local = NULL;
g_autoptr(GPtrArray) bos_descriptors = NULL;

/* already matched a quirk entry */
if (fu_device_has_internal_flag(FU_DEVICE(self), FU_DEVICE_INTERNAL_FLAG_NO_PROBE)) {
g_set_error_literal(error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED, "not probing");
return FALSE;
}

/* not supported, so there is no point opening */
if (g_usb_device_get_spec(priv->usb_device) <= 0x0200) {
g_set_error(error,
Expand Down

0 comments on commit 41ddd62

Please sign in to comment.