mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-15 05:28:26 +00:00
logitech-hidpp: Do not add peripheral devices for receiver in BL mode
This should fix flashing firmware when there are >= 2 receivers plugged in. Fixes https://github.com/fwupd/fwupd/issues/1951
This commit is contained in:
parent
d783c3a531
commit
9e755e2a5c
@ -163,7 +163,8 @@ fu_logitech_hidpp_peripheral_ping (FuLogitechHidPpPeripheral *self, GError **err
|
|||||||
fu_logitech_hidpp_peripheral_refresh_updatable (self);
|
fu_logitech_hidpp_peripheral_refresh_updatable (self);
|
||||||
|
|
||||||
/* if the HID++ ID is unset, grab it from the reply */
|
/* if the HID++ ID is unset, grab it from the reply */
|
||||||
if (self->hidpp_id == HIDPP_DEVICE_ID_UNSET) {
|
if (self->hidpp_id == HIDPP_DEVICE_ID_UNSET &&
|
||||||
|
msg->device_id != HIDPP_DEVICE_ID_UNSET) {
|
||||||
self->hidpp_id = msg->device_id;
|
self->hidpp_id = msg->device_id;
|
||||||
g_debug ("HID++ ID is %02x", self->hidpp_id);
|
g_debug ("HID++ ID is %02x", self->hidpp_id);
|
||||||
}
|
}
|
||||||
@ -504,6 +505,15 @@ fu_logitech_hidpp_peripheral_setup (FuDevice *device, GError **error)
|
|||||||
if (!fu_logitech_hidpp_peripheral_ping (self, error))
|
if (!fu_logitech_hidpp_peripheral_ping (self, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
/* did not get ID */
|
||||||
|
if (self->hidpp_id == HIDPP_DEVICE_ID_UNSET) {
|
||||||
|
g_set_error_literal (error,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_FAILED,
|
||||||
|
"no HID++ ID");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* add known root for HID++2.0 */
|
/* add known root for HID++2.0 */
|
||||||
g_ptr_array_set_size (self->feature_index, 0);
|
g_ptr_array_set_size (self->feature_index, 0);
|
||||||
if (self->hidpp_version >= 2.f) {
|
if (self->hidpp_version >= 2.f) {
|
||||||
|
Loading…
Reference in New Issue
Block a user