-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detach all devices before suspending
Host controller drivers are detached on suspend, so all devices will be detached anyway. Do it before any domain is actually suspended to avoid deadlock. Fixes QubesOS/qubes-issues#4657
- Loading branch information
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
# Detach all devices before suspend | ||
|
||
for dev in /sys/bus/usb/devices/*/usbip_sockfd; do | ||
if [ -w "$dev" ]; then | ||
echo -1 > "$dev" | ||
fi | ||
done |