Skip to contentSkip to conversation

usb: gadget: functions: add ftrace export over USB

DISCUSSION Felipe Balbi 1 participant 1 message Mar 21, 2019 USB

lore
Share & tools
lore
#0 lore raw

hi,

Quoted 15 lines · Greg KH
Quoted 5 lines · Felipe Balbi
Quoted 5 lines
(quoted diff) +5 -0
+static struct usb_interface_descriptor ftrace_intf_desc = {
+	.bLength		= USB_DT_INTERFACE_SIZE,
+	.bDescriptorType	= USB_DT_INTERFACE,
+
+	.bAlternateSetting	= 0,
Quoted 8 lines

Review

Quoted 3 lines
(quoted diff) +3 -0
+	.bNumEndpoints		= 1,
+	.bInterfaceClass	= USB_CLASS_VENDOR_SPEC,
+	.bInterfaceSubClass	= USB_SUBCLASS_VENDOR_SPEC,

We *may* be able to use the USB_DEBUG_CLASS here with a vendor protocol which we define to be Linux Ftrace. If folks think it would be best, then I can go look at the debug class and check whether it would be feasible.

Quoted 2 lines

I didn't think that that class allowed vendor protocols, but if it does, sure, that would be nice.

I think it does. That spec is public, actually. Came out as part of usb 3.1. I'll review the spec tomorrow and, hopefully, resend this with Diagnostic Class for the interface using DvC.Trace subclass and vendor protocol.

cheers