usb fix
This commit is contained in:
parent
29c51fe694
commit
a1d6728c59
@ -156,12 +156,20 @@ for s in fs hs ss; do
|
||||
done
|
||||
|
||||
# ── 4. Video‑Control interface (must be a real directory) ───────────
|
||||
mkdir -p "$F/control/header/h" # REAL dir – no symlink
|
||||
mkdir -p "$F/control/header/h" # real dir – must exist first
|
||||
|
||||
# Link that directory into the per‑speed class dirs (relative links required)
|
||||
# The kernel may need a few ms to add class/{fs,hs,ss}; wait and link
|
||||
for s in fs hs ss; do
|
||||
mkdir -p "$F/control/class/$s"
|
||||
ln -sf ../../header/h "$F/control/class/$s/h"
|
||||
# give the kernel up to 0.5 s to create the directory
|
||||
for _ in {1..50}; do
|
||||
[[ -d "$F/control/class/$s" ]] && break
|
||||
sleep 0.010
|
||||
done
|
||||
# some gadgets (FS‑only) never get “hs” – skip gracefully
|
||||
[[ -d "$F/control/class/$s" ]] || continue
|
||||
|
||||
# finally create the mandatory ‘h’ link
|
||||
ln -sf ../../header/h "$F/control/class/$s/h"
|
||||
done
|
||||
|
||||
echo 0x0 >"$F/control/terminal/camera/default/bmControls" 2>/dev/null || true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user