Commit 99284813 authored by Mathias Nyman's avatar Mathias Nyman Committed by Greg Kroah-Hartman
Browse files

xhci: pass port structure to tracing instead of port number



We want to trace other port structure members than just port number
so pass entire port structure as parameter instead of just port number.

Dig the port number from the port structure.

Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20231019102924.2797346-2-mathias.nyman@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5220d8b0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1262,7 +1262,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
			retval = -ENODEV;
			break;
		}
		trace_xhci_get_port_status(wIndex, temp);
		trace_xhci_get_port_status(port, temp);
		status = xhci_get_port_status(hcd, bus_state, wIndex, temp,
					      &flags);
		if (status == 0xffffffff)
@@ -1687,7 +1687,7 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)
			retval = -ENODEV;
			break;
		}
		trace_xhci_hub_status_data(i, temp);
		trace_xhci_hub_status_data(ports[i], temp);

		if ((temp & mask) != 0 ||
			(bus_state->port_c_suspend & 1 << i) ||
+1 −1
Original line number Diff line number Diff line
@@ -1906,7 +1906,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
	xhci_dbg(xhci, "Port change event, %d-%d, id %d, portsc: 0x%x\n",
		 hcd->self.busnum, hcd_portnum + 1, port_id, portsc);

	trace_xhci_handle_port_status(hcd_portnum, portsc);
	trace_xhci_handle_port_status(port, portsc);

	if (hcd->state == HC_STATE_SUSPENDED) {
		xhci_dbg(xhci, "resume root hub\n");
+9 −9
Original line number Diff line number Diff line
@@ -509,14 +509,14 @@ DEFINE_EVENT(xhci_log_ring, xhci_inc_deq,
);

DECLARE_EVENT_CLASS(xhci_log_portsc,
		    TP_PROTO(u32 portnum, u32 portsc),
		    TP_ARGS(portnum, portsc),
		    TP_PROTO(struct xhci_port *port, u32 portsc),
		    TP_ARGS(port, portsc),
		    TP_STRUCT__entry(
				     __field(u32, portnum)
				     __field(u32, portsc)
				     ),
		    TP_fast_assign(
				   __entry->portnum = portnum;
				   __entry->portnum = port->hcd_portnum;
				   __entry->portsc = portsc;
				   ),
		    TP_printk("port-%d: %s",
@@ -526,18 +526,18 @@ DECLARE_EVENT_CLASS(xhci_log_portsc,
);

DEFINE_EVENT(xhci_log_portsc, xhci_handle_port_status,
	     TP_PROTO(u32 portnum, u32 portsc),
	     TP_ARGS(portnum, portsc)
	     TP_PROTO(struct xhci_port *port, u32 portsc),
	     TP_ARGS(port, portsc)
);

DEFINE_EVENT(xhci_log_portsc, xhci_get_port_status,
	     TP_PROTO(u32 portnum, u32 portsc),
	     TP_ARGS(portnum, portsc)
	     TP_PROTO(struct xhci_port *port, u32 portsc),
	     TP_ARGS(port, portsc)
);

DEFINE_EVENT(xhci_log_portsc, xhci_hub_status_data,
	     TP_PROTO(u32 portnum, u32 portsc),
	     TP_ARGS(portnum, portsc)
	     TP_PROTO(struct xhci_port *port, u32 portsc),
	     TP_ARGS(port, portsc)
);

DECLARE_EVENT_CLASS(xhci_log_doorbell,