[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reinserting USB plug via software



On Tue, 20 Jan 2009, Stackpole, Chris wrote:
> > What commands would be the equivalent to pulling the USB connector out
> > of the computer, waiting a second, and then putting it back in?

rmmod uhci-hcd; rmmod ehci-hcd; sleep 1; modprobe ehci-hcd; \
modprobe uhci-hcd

(you may also need ohci-hcd, but the above is the most common setup)

If you do something stupid with that, like running it with usb-storage
filesystems mounted, and the kernel happens to let you do it, you may suffer
data-loss.  You have been warned.   It will bring down (logically) all USB
buses, then bring them up again.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


Reply to: