Add some comments --- src/usb-backend.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/usb-backend.c b/src/usb-backend.c index f07009ad..ec0ae3e8 100644 --- a/src/usb-backend.c +++ b/src/usb-backend.c @@ -47,6 +47,8 @@ struct _SpiceUsbBackendDevice { + /* Pointer to device. Either real device (libusb_device) + * or emulated one (edev) */ libusb_device *libusb_device; SpiceUsbEmulatedDevice *edev; gint ref_count; @@ -70,6 +72,8 @@ struct _SpiceUsbBackend #endif SpiceUsbEmulatedDeviceCreate dev_init[USB_DEV_TYPE_MAX]; + /* Mask of allocated device, a specific bit set to 1 to indicate that the device at + * that address is allocated */ uint32_t own_devices_mask; }; @@ -418,7 +422,8 @@ SpiceUsbBackend *spice_usb_backend_new(GError **error) libusb_set_option(be->libusb_context, LIBUSB_OPTION_USE_USBDK); #endif #endif - be->own_devices_mask = 3; /* exclude addresses 0 and 1 */ + /* exclude addresses 0 (reserved) and 1 (root hub) */ + be->own_devices_mask = 3; } SPICE_DEBUG("%s <<", __FUNCTION__); return be; -- 2.20.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel