To prevent USB autosuspend completely, you can add ‘usbcore.autosuspend=-1’ to GRUB. Alternatively, create a file in /etc/modprobe.d/ directory eg 20-usbsuspend.conf with the following entry
options usbcore autosuspend=-1
Particular devices can be configured using a udev rule. For example, for a USB device ‘0xxx:0yyy’ you could do
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0xxx", ATR{idProduct}=="0xyyy", ATTR{Power/Control}="on"
References
https://wiki.archlinux.org/index.php/Power_management#USB_autosuspend
https://www.kernel.org/doc/Documentation/usb/power-management.txt
power/control
This file contains one of two words: "on" or "auto".
You can write those words to the file to change the
device's setting.
"on" means that the device should be resumed and
autosuspend is not allowed. (Of course, system
suspends are still allowed.)
"auto" is the normal state in which the kernel is
allowed to autosuspend and autoresume the device.
(In kernels up to 2.6.32, you could also specify
"suspend", meaning that the device should remain
suspended and autoresume was not allowed. This
setting is no longer supported.)
power/autosuspend_delay_ms
This file contains an integer value, which is the
number of milliseconds the device should remain idle
before the kernel will autosuspend it (the idle-delay
time). The default is 2000. 0 means to autosuspend
as soon as the device becomes idle, and negative
values mean never to autosuspend. You can write a
number to the file to change the autosuspend
idle-delay time.
Writing “-1” to power/autosuspend_delay_ms and writing “on” to
power/control do essentially the same thing – they both prevent the
device from being autosuspended. Yes, this is a redundancy in the
API.