Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161577070
D51299.id160189.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D51299.id160189.diff
View Options
diff --git a/share/man/man4/udbc.4 b/share/man/man4/udbc.4
--- a/share/man/man4/udbc.4
+++ b/share/man/man4/udbc.4
@@ -1,48 +1,39 @@
-.\" -
-.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2025 The FreeBSD Foundation
.\"
.\" This documentation was written by Tom Jones <thj@freebsd.org> under
.\" sponsorship from the FreeBSD Foundation.
.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\"
-.Dd July 14, 2025
+.Dd August 11, 2025
.Dt UDBC 4
.Os
.Sh NAME
.Nm udbc
.Nd USB Debug Host mode driver
.Sh SYNOPSIS
-To compile this driver into the kernel,
-place the following lines in your
-kernel configuration file:
-.Bd -ragged -offset indent
.Cd "device usb"
.Cd "device ucom"
.Cd "device udbc"
-.Ed
.Pp
-Alternatively, to load the driver as a
-module at boot time, place the following line in
-.Xr loader.conf 5 :
-.Bd -literal -offset indent
-udbc_load="YES"
-.Ed
+In
+.Xr rc.conf 5 :
+.Cd kld_list="udbc"
.Sh DESCRIPTION
The USB eXtensible Host Controller Interface standard defines a high speed
debug mode a controller can enter which enables low level debugging of a
Debug Target.
.Pp
+The
+.Nm
+driver provides support for the Host side of USB debug.
+.Pp
The Target must be an XHCI controller with support for the debug extended
capability and a directly accessible port on the controller (connectable
-without any intermedia USB hus),
+without any intermediate USB hub),
the Host can be any system with an available USB 3 port.
-.Nm
-driver provides support of the Host side of USB debug.
-The
-.Nm
-enables a Host to debug a Target using the xHCI debug interface.
.Pp
The debug mode must be configured on the Target and Host and Target connected
to the Host with a special USB 3 cable.
@@ -53,9 +44,9 @@
driver which makes it behave like a
.Xr tty 4 .
.Sh HARDWARE
-To attach the Host must be connected to a target with a special USB 3 cable
+To attach the Host must be connected to a Target with a special USB 3 cable
which has the VBUS, D+ and D- wires disconnected.
-Once the target is configured to use xhci debug and a cable connects the Host
+Once the Target is configured to use xhci debug and a cable connects the Host
and the Target the
.Nm
driver will attach.
@@ -76,8 +67,9 @@
.Sh SEE ALSO
.Xr tty 4 ,
.Xr ucom 4 ,
-.Xr usb 4
-.Pp
+.Xr usb 4 ,
+.Xr xhci 4
+.Sh STANDARDS
.It
.Rs
.%T eXtensible Host Controller Interface for Universal Serial Bus (XHCI)
@@ -105,7 +97,7 @@
any USB 3.0 port,
whether connected to directly to a controller or with a hub in between.
Testing on some controllers has encountered issues when using a hub rather than
-a port directly.
+a directly connected port on the controller.
.Pp
The interaction between USB Debug, USB 3 A connectors and USB-C connectors is
unclear,
diff --git a/sys/dev/usb/serial/udbc.c b/sys/dev/usb/serial/udbc.c
--- a/sys/dev/usb/serial/udbc.c
+++ b/sys/dev/usb/serial/udbc.c
@@ -51,17 +51,17 @@
#include <sys/unistd.h>
#include <dev/usb/usb.h>
-#include <dev/usb/usb_core.h>
#include <dev/usb/usb_ioctl.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdi_util.h>
+#include <dev/usb/usb_core.h>
#include "usbdevs.h"
#define USB_DEBUG_VAR udbc_debug
+#include <dev/usb/usb_process.h>
#include <dev/usb/serial/usb_serial.h>
#include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
static SYSCTL_NODE(_hw_usb, OID_AUTO, udbc, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"USB DbC Client");
@@ -157,17 +157,6 @@
DEVMETHOD(device_detach, udbc_detach), DEVMETHOD_END
};
-static driver_t udbc_driver = {
- .name = "udbc",
- .methods = udbc_methods,
- .size = sizeof(struct udbc_softc),
-};
-
-DRIVER_MODULE(udbc, uhub, udbc_driver, NULL, NULL);
-MODULE_DEPEND(udbc, ucom, 1, 1, 1);
-MODULE_DEPEND(udbc, usb, 1, 1, 1);
-MODULE_VERSION(udbc, 1);
-
static int
udbc_probe(device_t dev)
{
@@ -409,3 +398,14 @@
usbd_transfer_poll(sc->sc_xfer, UDBC_N_TRANSFER);
}
+
+static driver_t udbc_driver = {
+ .name = "udbc",
+ .methods = udbc_methods,
+ .size = sizeof(struct udbc_softc),
+};
+
+DRIVER_MODULE(udbc, uhub, udbc_driver, NULL, NULL);
+MODULE_DEPEND(udbc, ucom, 1, 1, 1);
+MODULE_DEPEND(udbc, usb, 1, 1, 1);
+MODULE_VERSION(udbc, 1);
diff --git a/sys/modules/usb/Makefile b/sys/modules/usb/Makefile
--- a/sys/modules/usb/Makefile
+++ b/sys/modules/usb/Makefile
@@ -46,10 +46,9 @@
SUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} \
${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} ${_bcm2838_xhci}
SUBDIR += mtw ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw}
-SUBDIR += atp cfumass uhid uhid_snes ukbd ums udbp uep wmt wsp ugold uled \
- usbhid
-SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom udbc ufoma uftdi ugensa uipaq \
- ulpt umb umct umcs umodem umoscom uplcom uslcom uvisor uvscom
+SUBDIR += atp cfumass uhid uhid_snes ukbd ums udbp uep wmt wsp ugold uled usbhid
+SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom udbc ufoma uftdi ugensa uipaq
+SUBDIR += ulpt umb umct umcs umodem umoscom uplcom uslcom uvisor uvscom
SUBDIR += i2ctinyusb
SUBDIR += cp2112
SUBDIR += udl
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 6, 12:52 AM (7 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34730354
Default Alt Text
D51299.id160189.diff (4 KB)
Attached To
Mode
D51299: udbc: Add usb debug host mode driver
Attached
Detach File
Event Timeline
Log In to Comment