Description
Hi.
First of all, thanks for you soft !
I use USB Hub based on Microchip 2517 with Ubuntu 18.04 LTS x63 with kernel 5.4.0-126.
And I have the same issue - that is a device on powered off port of the hub is still "remained" on the system.
I mean the virtual part of it.
As I saw at there is clearing ENABLE feature of the port and calling usb_remove_device().
I offer to add these steps to the main code of uhubctl.
First part I think will be as a follows:
if (request == LIBUSB_REQUEST_CLEAR_FEATURE) { rc = libusb_control_transfer(devh, LIBUSB_REQUEST_TYPE_CLASS | LIBUSB_RECIPIENT_OTHER, request, USB_PORT_FEAT_ENABLE, // USB_PORT_FEAT_POWER, port, NULL, 0, USB_CTRL_GET_TIMEOUT); }
And then add usb_remove_device().
At he time I don' t know how is to do so, I included usb.h but there is no effect.
By the way, there is no the issue when USB device is unplugged manually.
Why ??