Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Assume a USB devices is powered by USB bus. Sometimes the firmware in the USB device encounter a problem and can't recovery by itself. I have to unplug and plug the USB device from the host.

Is there a way that I can dis-power the USB device, and later re-enable the USB device in Linux driver or in shell command?

By the way, I need a standard method. In specific platforms, I can disable the USB EHCI/OHCI's power in driver.

share

migration rejected from stackoverflow.com May 22 '13 at 15:52

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off topic by Sathya May 22 '13 at 15:52

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Have you tried unbinding the device from the driver yet? –  Ignacio Vazquez-Abrams May 21 '13 at 3:43
    
I seem to recall that there actually is a standard way to tell a hub to power down a port, but most are built without the necessary high side switches to actually make it work (even if the logic that would control them is there). If the firmware is really in a bad state, it's possible that no USB bus state transition that doesn't interrupt power will fix it (since the firmware has to make an effort to actually pay attention to the USB), though if it's a firmware undergoing development it might be worth checking if the MCU on which it is running has a watchdog timer which could be enabled. –  Chris Stratton May 21 '13 at 5:19
    
To: Ignacio Vazquez-Abrams: It doesn't work. –  Bennett Ma May 21 '13 at 6:59
    
TO Chris Stratton: Can you tell me the name of the function which is used to tell the hub core driver to power down a port? –  Bennett Ma May 21 '13 at 7:01
    
This should be sent back to stack overflow, as it concerns low-level internal details of the USB driver (ie, kernel programming), not configuration. –  Chris Stratton May 22 '13 at 15:12