usb fix
This commit is contained in:
parent
29c51fe694
commit
a1d6728c59
@ -156,11 +156,19 @@ for s in fs hs ss; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# ── 4. Video‑Control interface (must be a real directory) ───────────
|
# ── 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
|
for s in fs hs ss; do
|
||||||
mkdir -p "$F/control/class/$s"
|
# 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"
|
ln -sf ../../header/h "$F/control/class/$s/h"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user