Skip to contentSkip to conversation

usb: xhci: Add DbC support in xHCI driver

PATCH Superseded Greg Kroah-Hartman 1 participant 1 message Dec 8, 2017 USB

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

PATCH 9/14 usb: xhci: Add DbC support in xHCI driver

Quoted 16 lines · Mathias Nyman

From: Lu Baolu <[email protected]>

xHCI compatible USB host controllers(i.e. super-speed USB3 controllers) can be implemented with the Debug Capability(DbC). It presents a debug device which is fully compliant with the USB framework and provides the equivalent of a very high performance full-duplex serial link. The debug capability operation model and registers interface are defined in 7.6.8 of the xHCI specification, revision 1.1.

The DbC debug device shares a root port with the xHCI host. By default, the debug capability is disabled and the root port is assigned to xHCI. When the DbC is enabled, the root port will be assigned to the DbC debug device, and the xHCI sees nothing on this port. This implementation uses a sysfs node named <dbc> under the xHCI device to manage the enabling and disabling of the debug capability.

Quoted 8 lines

When the debug capability is enabled, it will present a debug device through the debug port. This debug device is fully compliant with the USB3 framework, and it can be enumerated by a debug host on the other end of the USB link. As soon as the debug device is configured, a TTY serial device named /dev/ttyDBC0 will be created.

This patch produces the following build warning for me:

drivers/usb/host/xhci-dbgcap.c: In function ‘xhci_dbc_eps_exit’:
drivers/usb/host/xhci-dbgcap.c:369:2: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
memset(dbc->eps, 0, ARRAY_SIZE(dbc->eps));
^~~~~~

Can you send a follow-on patch to fix it up?

And you might want to update to a newer version of gcc :)

thanks,

greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html