On Thu, Jun 02, 2022 at 11:34:54PM +0200, Michael Grzeschik wrote: > On Thu, Jun 02, 2022 at 03:16:27PM -0400, Alan Stern wrote: > > On Thu, Jun 02, 2022 at 04:59:18PM +0200, Michael Grzeschik wrote: > > > Because of that; I am currently curious if we just should rename that > > > property to something more generic like "enable" or "disable". So that > > > as the real vbus power switching is missing, the hubs port switching > > > does still function like intended. > > > > That makes sense. But the question arises, does this patch really do what > > you want? > > > > The patch description talks about the need to disable devices or > > re-enumerate them. You can disable a device right now by writing -1 to > > the bConfigurationValue sysfs file, and you can force a device to be > > re-enumerated by resetting it (using the USBDEVFS_RESET usbfs ioctl). > > > > About the only thing you can't currently do is actually turn off power to > > the port. This patch will allow users to do that, but only if the hub > > supports power switching. > > > > (Okay, there's one other thing: The patch also allows users to disable a > > port, so that devices plugged into that port get ignored. Maybe that's > > what you really had in mind...?) > > Yes, that is what I had in mind. If you agree, I would still keep the > name "port_power" since it is the main function, but skip the > hub_is_port_power_switchable check. I favor the more generic name. "disable" will be more understandable for users than "port_power", if the file doesn't actually control the bus power. Alan Stern