From 5f3a2c0bc1fe0e48657e717aa1971dd680e05fa8 Mon Sep 17 00:00:00 2001 From: Emily Date: Mon, 23 Mar 2020 14:13:04 +0800 Subject: [PATCH] vli: Only consider the high nibble when building the sub-version --- plugins/vli/fu-vli-pd-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/vli/fu-vli-pd-device.c b/plugins/vli/fu-vli-pd-device.c index 742f4fe76..9485a4488 100644 --- a/plugins/vli/fu-vli-pd-device.c +++ b/plugins/vli/fu-vli-pd-device.c @@ -280,7 +280,7 @@ fu_vli_pd_device_setup (FuVliDevice *device, GError **error) if (fu_vli_device_get_kind (device) == FU_VLI_DEVICE_KIND_UNKNOWN) { if (!fu_vli_pd_device_read_reg (self, 0x0018, &tmp, error)) return FALSE; - switch (tmp) { + switch (tmp & 0xF0) { case 0x00: fu_vli_device_set_kind (device, FU_VLI_DEVICE_KIND_VL100); break; @@ -298,7 +298,7 @@ fu_vli_pd_device_setup (FuVliDevice *device, GError **error) g_set_error (error, FWUPD_ERROR, FWUPD_ERROR_INVALID_FILE, - "unable to map 0x0018=%0x02x to device kind", + "unable to map 0x0018=0x%02X to device kind", tmp); return FALSE; }