From nobody Fri Dec 19 14:04:59 2025 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5557271A71 for ; Mon, 13 Oct 2025 02:01:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760320905; cv=none; b=iDnuaTmhpq8DXnMjcmziHrFLMGMtJoZ/EjfT5xKFlWK0TrRSaymzlJfvfm/6bsF0u43b7zClMbDyBCO7Ee0wW3oyGxupDtMp+KgGVqrEIHLPGYoxKYah0WlRMjSEQtfX5yFwZ6+u/GdD5JYISJp6HVMYsts2lJcLh9UPPqsir24= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760320905; c=relaxed/simple; bh=W1ZqjHMGkcPhS96Nn90N/uD9fXd06oRK0TD8pV2UjtE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Y4J688ClO9O6bzk/73nwUZULVaPsEB79w2336ekH2KhabKmlxTekENfYLxAFFlVsoLnktZ1+A7x4ixnDwABInyOELxVDJz8xTTuHfyfzZyQj6s1f/D5lMvvvw+jX3DT++Vr8z1m5UIHHw4/iuM7FgpUrAIr6Ik0cHzAXGBogsu0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--khtsai.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=yg7ZZgfH; arc=none smtp.client-ip=209.85.216.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--khtsai.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="yg7ZZgfH" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-339d5dbf58aso17618673a91.3 for ; Sun, 12 Oct 2025 19:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1760320903; x=1760925703; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=AZ1i8QSg+r+2r4eoIxO5kfRXFS/eP5RBlsPS/OSnjmM=; b=yg7ZZgfH561D5d7rM6f4vzzH5yxyugBTWTGzm6moAWLWz8m7C23eBiJ+gR2ZuXAlsr Ov1sV04R1oMSJF5E3H8fuToVBfr+v8kzG5ujQPssa/PiQ550FoLlwitk9NrDCYatNDiX w2xmF8tzhTSSoTJKAzWlviofRiYKG3jRwSkAxAFL875ZOePn4R+LZ4IK0Mi7lthpP5e3 sbtiqdvMJZPaKHPer8+qCAxE66L97Ku8juTVM8VCoWr6cjORJY7V1z37pR7l4jwKhA33 sKi6FmFSZGEnbxmN1OyUIYCjT21PVBwqU3HE1sy0IPKIvZVzKu5Z3TVwW8aRwcQmkFLu BoDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760320903; x=1760925703; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AZ1i8QSg+r+2r4eoIxO5kfRXFS/eP5RBlsPS/OSnjmM=; b=FXB4DA7MbN/HSKWV8424dHLymGUVGqFO28gKd0Q7eZuQMZohcZX2V/QbDazfcsR/qq mvMkwSHN90aDKyj8etiyhUDe4OeRMAArH08cgijG/VhhSQIiNM84zSrfSMeeZzYPj/oU 4d+sf4910+QM1vloYWre+rcm+YcKitj2YIgbUk71BcO50oJz6by8L+63MMnGDPs2sUR9 7BBHPUDLuDUHgEq2kVqIa/GnPOKH2HJBRxvCmxQzTelF3YuTiqbXU1ZMW/SlJm1KHMGW UMeN2ZSIQgYGvmhFArEl3dOcNjD/0IiFDntlxBaBHQJRtCBwJm+qMNQ3OEQTaQ3NnV1N zCmA== X-Forwarded-Encrypted: i=1; AJvYcCViX37Pao+m0Oql70FWhY4ijv1+kaeJyKuQ9D64bpx+3nQ1qkqKuYXcdlWo5W+f84Oi25r7SCHYNW/H/4w=@vger.kernel.org X-Gm-Message-State: AOJu0Yw49+JsaVbthODCC0qKynMSBoJxrKEPWTZB1pnFKMm8ZYRxJ2bM uq5rhxneUi4UlZwaFyX7Ina8rsd7xB8Xw2MmoIB5Fuis+n/a2jTSm4HwgCK4AmljaOwUm7gmA2t gqLMaUg== X-Google-Smtp-Source: AGHT+IGkr8UAfp8910PuFH8e/qEzAisukJhG++h2a5IVreybtqueuR45Jc5ifmR2fC/4KhF1YX6HdXl7BV8= X-Received: from pjbsn4.prod.google.com ([2002:a17:90b:2e84:b0:330:88c4:627]) (user=khtsai job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:38cc:b0:32e:73fd:81a3 with SMTP id 98e67ed59e1d1-33b513eb0femr29690215a91.33.1760320903029; Sun, 12 Oct 2025 19:01:43 -0700 (PDT) Date: Mon, 13 Oct 2025 10:01:22 +0800 In-Reply-To: <20251013-usbcore-tracing-v1-0-b885a3121b09@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251013-usbcore-tracing-v1-0-b885a3121b09@google.com> X-Developer-Key: i=khtsai@google.com; a=ed25519; pk=abA4Pw6dY2ZufSbSXW9mtp7xiv1AVPtgRhCFWJSEqLE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1760320897; l=2427; i=khtsai@google.com; s=20250916; h=from:subject:message-id; bh=W1ZqjHMGkcPhS96Nn90N/uD9fXd06oRK0TD8pV2UjtE=; b=YbB7vEuy7St/zF23D/kZ6foaQL+87G2fS0eKhALJBnNRa8Wn1LTjy6hJZ9kK3q0YgkIvEuY2d O+dRkkL4FcVAH90lo9fEVWYOOj/Fl6KvUMnum8BnZfjHFLLfFKaLeQt X-Mailer: b4 0.14.2 Message-ID: <20251013-usbcore-tracing-v1-1-b885a3121b09@google.com> Subject: [PATCH 1/2] usb: core: Centralize device state update logic From: Kuen-Han Tsai To: Greg Kroah-Hartman , Mathias Nyman , Alan Stern Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Kuen-Han Tsai Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Introduce a new static inline function, update_usb_device_state(), to centralize the process of changing a device's state, including the management of active_duration during suspend/resume transitions. This change prepares for adding tracepoints, allowing tracing logic to be added in a single, central location within the new helper function. Signed-off-by: Kuen-Han Tsai --- drivers/usb/core/hub.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 256fe8c86828d51c33442345acdb7f3fe80a98ce..ce3d94c960470e9be7979b10215= 51eab5fd03517 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2147,6 +2147,20 @@ static void update_port_device_state(struct usb_devi= ce *udev) } } =20 +static inline void update_usb_device_state(struct usb_device *udev, + enum usb_device_state new_state) +{ + if (udev->state =3D=3D USB_STATE_SUSPENDED && + new_state !=3D USB_STATE_SUSPENDED) + udev->active_duration -=3D jiffies; + else if (new_state =3D=3D USB_STATE_SUSPENDED && + udev->state !=3D USB_STATE_SUSPENDED) + udev->active_duration +=3D jiffies; + + udev->state =3D new_state; + update_port_device_state(udev); +} + static void recursively_mark_NOTATTACHED(struct usb_device *udev) { struct usb_hub *hub =3D usb_hub_to_struct_hub(udev); @@ -2156,10 +2170,7 @@ static void recursively_mark_NOTATTACHED(struct usb_= device *udev) if (hub->ports[i]->child) recursively_mark_NOTATTACHED(hub->ports[i]->child); } - if (udev->state =3D=3D USB_STATE_SUSPENDED) - udev->active_duration -=3D jiffies; - udev->state =3D USB_STATE_NOTATTACHED; - update_port_device_state(udev); + update_usb_device_state(udev, USB_STATE_NOTATTACHED); } =20 /** @@ -2209,14 +2220,7 @@ void usb_set_device_state(struct usb_device *udev, else wakeup =3D 0; } - if (udev->state =3D=3D USB_STATE_SUSPENDED && - new_state !=3D USB_STATE_SUSPENDED) - udev->active_duration -=3D jiffies; - else if (new_state =3D=3D USB_STATE_SUSPENDED && - udev->state !=3D USB_STATE_SUSPENDED) - udev->active_duration +=3D jiffies; - udev->state =3D new_state; - update_port_device_state(udev); + update_usb_device_state(udev, new_state); } else recursively_mark_NOTATTACHED(udev); spin_unlock_irqrestore(&device_state_lock, flags); --=20 2.51.0.740.g6adb054d12-goog From nobody Fri Dec 19 14:04:59 2025 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F8A4280035 for ; Mon, 13 Oct 2025 02:01:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760320907; cv=none; b=kJRso92QNmDZ/rVjLrTEDArfhHMfVw7HS2/B6QNNx3GsREQLi9r0FCZD9G/znz0lSqW6GYPogIEiGkmfCskDi7rm2dctMAzRx4AWiGondag5534DOGyWk1jChYZ+rZW3SchEwZIk8t5gaXkb3VpHTESqxQO7ENjaUnivmjIcHGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760320907; c=relaxed/simple; bh=cGrDWQbl1KjpVjUGq5IAO3MhdrEeWTCMATf7WJS5b6c=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=TGbKNaGZ5cozGKlm1qtlc5fV6iP6rY/Y3NOQ5LHwkKfgshevK70os9uRMtquz8yLUEn0EzsUguv2xAXeSkXE5HubBtZ+xiIwXNS92J0wzwLYyMVx9LJla3cU8+P8ABxxO/EhP/JBx+spOwaqALniHJz5JQkH5Ed9DkvGmYvBkPM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--khtsai.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=UfjByJKw; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--khtsai.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="UfjByJKw" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-272b7bdf41fso90482205ad.0 for ; Sun, 12 Oct 2025 19:01:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1760320905; x=1760925705; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=idZeMEzFynmM4Yz87Kr2/ZMpJ43boOVUflCLeT840S8=; b=UfjByJKwVqnF7eul3/s8KI8Q+6uY9h0g67hu9Lz9Q1I31vWkc0XoCIW9KohhhY46tf WBoHN5B4RSN3m3OuA/nD86NT67Ex7gvjigEfMxDz87ijlIFDqIh6l/8bcyz5/AZwSxvD A0gfIU0+qw25CET8gXixBVyVOrZz3iLYC8gwyX1FGr95RVBaeZT8K6ZKoPEuQB2yjCjE A4sB0jCqK4C8yvbgmY7H5wJFpXxagGPutvQQiXxU94nK5vhhbmieau/NjLEuBfXYxRKG /YnbaeKXHUUVCWRmRzaFWa6nQCcs7kvVZmxbL7WcPIL/nnvxQZa+y4eKthTkXoIXMXye vKUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760320905; x=1760925705; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=idZeMEzFynmM4Yz87Kr2/ZMpJ43boOVUflCLeT840S8=; b=Tk5laR97SNVzcQ3mX8xdaGsZbOw8SDRvC89cqXH9duVNqmoNCNwqWaPQGblpl8WDUG g+M6pzXBh5me7G0MD5xYeOuo0wNUm2rX7U7giwPbWiI/ncwr20oz4IVOpvppRBwhZJwZ zyi10MN838n716DF7KVKoC4ITTdERIxl+gEi457BGFACkkUj1lQLLQNKhirJVC0Z0QmT J7E9eb2pWGIIaM39LyjbReH/LRYw39HIU48LLCGhhQnGPQmVPo2CZbqEVtH89k56SsGP XH83URcxWsX/Mes7hpHDxhSTJRN1BZVxpJ/KJbNt9targEX/C35MbaZNuPGKtRvMTpWO Ixgg== X-Forwarded-Encrypted: i=1; AJvYcCVFFSxgOPrnH7W+LP8CzP0pNJRRl+kgkCSSZJxqqJkIwBfdUwHFy05VOK01GuwHRvcpXzKmOMlnT8Lu+BE=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5AexC68NjKwxi70qxhQ2DAYjyao+gTehqkWXYaecgVFyDdg+1 BcTftOJiBqoPVOOpl9jr/FsNn5+H7wOjkmc5pZH1vDBrW+1cMoK3rrr6IkVH7PqW0VR4DTxK97n liRAT+g== X-Google-Smtp-Source: AGHT+IF3SgXMgz0ThHHx1rlALTh1Z9Z6N/RtNr915FZ2PYaekTLVhQ9rSpxCm3gc/dRa+D3CTTt+F3bexzc= X-Received: from pjbsq6.prod.google.com ([2002:a17:90b:5306:b0:32b:ae4c:196c]) (user=khtsai job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:2a87:b0:24a:d213:9e74 with SMTP id d9443c01a7336-290272dfbb7mr264993255ad.49.1760320905070; Sun, 12 Oct 2025 19:01:45 -0700 (PDT) Date: Mon, 13 Oct 2025 10:01:23 +0800 In-Reply-To: <20251013-usbcore-tracing-v1-0-b885a3121b09@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251013-usbcore-tracing-v1-0-b885a3121b09@google.com> X-Developer-Key: i=khtsai@google.com; a=ed25519; pk=abA4Pw6dY2ZufSbSXW9mtp7xiv1AVPtgRhCFWJSEqLE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1760320897; l=5685; i=khtsai@google.com; s=20250916; h=from:subject:message-id; bh=cGrDWQbl1KjpVjUGq5IAO3MhdrEeWTCMATf7WJS5b6c=; b=Vg1PNgDDOsJV4tGBIEFwbR414NtO0ueQmvT69trGfXK4aXLtRJrAZxHvFpkjqPIn/CMYzsdaf jMzwYaco8lPCtcF8C54VPPO5NM6LgTC1xBoBfQOsXJG/FUO2AH0weGg X-Mailer: b4 0.14.2 Message-ID: <20251013-usbcore-tracing-v1-2-b885a3121b09@google.com> Subject: [PATCH 2/2] usb: core: Add tracepoints for device allocation and state changes From: Kuen-Han Tsai To: Greg Kroah-Hartman , Mathias Nyman , Alan Stern Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Kuen-Han Tsai Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Introduce new tracepoints to the USB core to improve debuggability of USB device lifecycle events. The following tracepoints are added: - usb_alloc_dev: Triggered when a new USB device structure is allocated, providing insights into early device setup. - usb_set_device_state: Triggered when the USB device state changes, allowing observation of the device's state transitions. These tracepoints capture detailed information about the USB device, including its name, speed, state, bus current value, and authorized flag. This will aid developers in diagnosing issues related to device enumeration within the USB subsystem. Examples: usb_alloc_dev: usb 1-1 speed 0 state 1 0mA [authorized] usb_set_device_state: usb 1-1 speed 0 state 2 0mA [authorized] usb_set_device_state: usb 1-1 speed 2 state 5 500mA [authorized] usb_set_device_state: usb 1-1 speed 2 state 5 500mA [authorized] usb_set_device_state: usb 1-1 speed 2 state 6 500mA [authorized] usb_set_device_state: usb 1-1 speed 2 state 7 500mA [authorized] usb_set_device_state: usb 1-1 speed 2 state 8 500mA [authorized] usb_set_device_state: usb 1-1 speed 2 state 0 500mA [authorized] Signed-off-by: Kuen-Han Tsai --- drivers/usb/core/Makefile | 4 ++++ drivers/usb/core/hub.c | 2 ++ drivers/usb/core/trace.c | 6 +++++ drivers/usb/core/trace.h | 61 +++++++++++++++++++++++++++++++++++++++++++= ++++ drivers/usb/core/usb.c | 2 ++ 5 files changed, 75 insertions(+) diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile index 766000b4939ef937a04848aa9cc45d8bb8860fe5..11647942ff3ae6c688dac043218= f7d886a3e2f88 100644 --- a/drivers/usb/core/Makefile +++ b/drivers/usb/core/Makefile @@ -3,10 +3,14 @@ # Makefile for USB Core files and filesystem # =20 +# define_trace.h needs to know how to find our header +CFLAGS_trace.o :=3D -I$(src) + usbcore-y :=3D usb.o hub.o hcd.o urb.o message.o driver.o usbcore-y +=3D config.o file.o buffer.o sysfs.o endpoint.o usbcore-y +=3D devio.o notify.o generic.o quirks.o devices.o usbcore-y +=3D phy.o port.o +usbcore-y +=3D trace.o =20 usbcore-$(CONFIG_OF) +=3D of.o usbcore-$(CONFIG_USB_XHCI_SIDEBAND) +=3D offload.o diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index ce3d94c960470e9be7979b1021551eab5fd03517..f66a197700c8b3414c624b8ec1b= b94c629e3280c 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -40,6 +40,7 @@ #include "hub.h" #include "phy.h" #include "otg_productlist.h" +#include "trace.h" =20 #define USB_VENDOR_GENESYS_LOGIC 0x05e3 #define USB_VENDOR_SMSC 0x0424 @@ -2159,6 +2160,7 @@ static inline void update_usb_device_state(struct usb= _device *udev, =20 udev->state =3D new_state; update_port_device_state(udev); + trace_usb_set_device_state(udev); } =20 static void recursively_mark_NOTATTACHED(struct usb_device *udev) diff --git a/drivers/usb/core/trace.c b/drivers/usb/core/trace.c new file mode 100644 index 0000000000000000000000000000000000000000..607bcf639d27f15a628537a8615= 5fa92df33fa14 --- /dev/null +++ b/drivers/usb/core/trace.c @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2025 Google LLC + */ +#define CREATE_TRACE_POINTS +#include "trace.h" diff --git a/drivers/usb/core/trace.h b/drivers/usb/core/trace.h new file mode 100644 index 0000000000000000000000000000000000000000..db6edf570640e7af0598ccf2c7b= d71b187605a42 --- /dev/null +++ b/drivers/usb/core/trace.h @@ -0,0 +1,61 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2025 Google LLC + */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM usbcore + +#if !defined(_USB_CORE_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) +#define _USB_CORE_TRACE_H + +#include +#include +#include + +DECLARE_EVENT_CLASS(usb_core_log_usb_device, + TP_PROTO(struct usb_device *udev), + TP_ARGS(udev), + TP_STRUCT__entry( + __string(name, dev_name(&udev->dev)) + __field(enum usb_device_speed, speed) + __field(enum usb_device_state, state) + __field(unsigned short, bus_mA) + __field(unsigned, authorized) + ), + TP_fast_assign( + __assign_str(name); + __entry->speed =3D udev->speed; + __entry->state =3D udev->state; + __entry->bus_mA =3D udev->bus_mA; + __entry->authorized =3D udev->authorized; + ), + TP_printk("usb %s speed %d state %d %dmA [%s]", + __get_str(name), + __entry->speed, + __entry->state, + __entry->bus_mA, + __entry->authorized ? "authorized" : "unauthorized") +); + +DEFINE_EVENT(usb_core_log_usb_device, usb_set_device_state, + TP_PROTO(struct usb_device *udev), + TP_ARGS(udev) +); + +DEFINE_EVENT(usb_core_log_usb_device, usb_alloc_dev, + TP_PROTO(struct usb_device *udev), + TP_ARGS(udev) +); + + +#endif /* _USB_CORE_TRACE_H */ + +/* this part has to be here */ + +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH . + +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE trace + +#include diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index b6b0b84895237e2c49b5e8015627ad2c24ee31c2..e740f7852bcdebdbcc30025dcdd= b16c062265d47 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -46,6 +46,7 @@ #include =20 #include "hub.h" +#include "trace.h" =20 const char *usbcore_name =3D "usbcore"; =20 @@ -746,6 +747,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *par= ent, #endif =20 dev->authorized =3D usb_dev_authorized(dev, usb_hcd); + trace_usb_alloc_dev(dev); return dev; } EXPORT_SYMBOL_GPL(usb_alloc_dev); --=20 2.51.0.740.g6adb054d12-goog