diff --git a/src/usb-import b/src/usb-import index 7b17799..a80580f 100755 --- a/src/usb-import +++ b/src/usb-import @@ -125,13 +125,18 @@ if [ -z "$untrusted_devid" ] && [ -z "$untrusted_speed" ]; then exit 1 fi +max_supported_speed=5 +if printf "6.12\n%s\n" "$(uname -r)" | sort -VC; then + max_supported_speed=6 +fi + case "$untrusted_speed" in 1.5) speed=1 ;; # Low Speed 12) speed=2 ;; # Full speed 480) speed=3 ;; # High Speed 53.3-480) speed=4 ;; # Wireless 5000) speed=5 ;; # Super Speed - 10000) speed=5 ;; # Super Speed Plus (USB 3.1); Announce as USB 3.0 until USBIP get support + 10000) speed=$max_supported_speed ;; # Super Speed Plus (USB 3.1); Announce as USB 3.0 until USBIP get support *) ERROR "Invalid speed \"$untrusted_speed\" received." \ "Expected \"1.5\", \"12\", \"480\", \"53.3-480\", \"5000\", \"10000\". " \ "If the remote side sent nothing, this could mean "\