1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
commit a5738f02804532efe96abd8c6d5df8beb6fd0a64
Author: Aurelien Jarno <aurelien@aurel32.net>
Date: Thu Jan 4 14:26:41 2024 +0100
Add a manpage for usbreset
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
diff --git a/Makefile.am b/Makefile.am
index d3a9025..22452ba 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,7 +49,8 @@ man_MANS = \
lsusb.8 \
lsusb.py.1 \
usbhid-dump.8 \
- usb-devices.1
+ usb-devices.1 \
+ usbreset.1
EXTRA_DIST = \
lsusb.8.in \
@@ -58,6 +59,7 @@ EXTRA_DIST = \
usb-devices.1.in \
usb-devices \
lsusb.py.in \
+ usbreset.1.in \
usbreset.c \
LICENSES/GPL-2.0-only.txt \
LICENSES/GPL-3.0-only.txt
@@ -80,11 +82,15 @@ usbhid-dump.8: $(srcdir)/usbhid-dump.8.in
usb-devices.1: $(srcdir)/usb-devices.1.in
sed 's|VERSION|$(VERSION)|g' $< >$@
+usbreset.1: $(srcdir)/usbreset.1.in
+ sed 's|VERSION|$(VERSION)|g' $< >$@
+
DISTCLEANFILES = \
lsusb.py \
lsusb.py.1 \
lsusb.8 \
usb-devices.1 \
+ usbreset.1 \
usbhid-dump.8
distclean-local:
diff --git a/usbreset.1.in b/usbreset.1.in
new file mode 100644
index 0000000..1474ebc
--- /dev/null
+++ b/usbreset.1.in
@@ -0,0 +1,53 @@
+.\" SPDX-License-Identifier: GPL-2.0-only
+.\" Copyright (c) 2023 Aurelien Jarno <aurelien@aurel32.net>
+.TH usbreset 1 "04 January 2024" "usbutils-VERSION" "Linux USB Utilities"
+.IX usbreset
+.SH NAME
+usbreset \- send a USB port reset to a USB device
+.SH SYNOPSIS
+.B usbreset
+[
+.I device
+]
+
+.SH DESCRIPTION
+.B usbreset
+is a utility that performs resets on USB devices. It is particularly useful
+situations where a USB device is unresponsive or exhibits erratic behavior.
+The USB \fIdevice\fP to be reset can be specified in one of three formats:
+.TP
+.BR PPPP:VVVV
+Reset by product and vendor IDs
+.TP
+.BR BBB/DDD
+Reset by bus and device number
+.TP
+.BR "Product"
+Reset by product name
+.PP
+When run without any arguments,
+.B usbreset
+provides usage information and a list of connected USB devices, including their
+product and vendor IDs, bus and device numbers, and product names.
+
+.SH RETURN VALUE
+If the specified device is not found, a non-zero exit code is returned.
+
+.SH EXAMPLES
+.TP
+Reset device with vendor ID 1234 and product ID 5678:
+.B usbreset 1234:5678
+
+.TP
+Reset device 002 on bus 001:
+.B usbreset 001:002
+
+.TP
+Reset device named USB2.0 Hub:
+.B usbreset """USB2.0 Hub"""
+
+.SH SEE ALSO
+.BR lsusb (8).
+
+.SH AUTHOR
+Alan Stern <stern@rowland.harvard.edu>
|