Дата публикации: Jan 22, 2017 11:28:37 AM
При настройке устройств иногда необходимо сбросить устройство. Раньше перегружал модули контроллеров, но это требовало закрыть дескрипторы всех устройств. По шаблону ниже можно перерегистрировать.
Шаблон отсюда:
3
down vote
Quickest way to reset will be to reset the USB controller itself. Doing so will enforce udev to unregister the device on disconnection, and register is back once you enable it.
echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci_hcd/unbind echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci_hcd/unbind echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci_hcd/bind echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci_hcd/bind
This should work for most PC environment. However, if you are using some custom hardware you can simply iterate through the device names. With this method you don't need to find out the device name by lsusb. You can incorporate in a automated script as well.