<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/dwc3/debug.h, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-09-06T13:21:59+00:00</updated>
<entry>
<title>usb: dwc3: Add trace event for dwc3_set_prtcap</title>
<updated>2025-09-06T13:21:59+00:00</updated>
<author>
<name>Kuen-Han Tsai</name>
<email>khtsai@google.com</email>
</author>
<published>2025-08-22T09:23:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=55f4ac8f93f4281134dfcf47de7b4588bb6074f2'/>
<id>urn:sha1:55f4ac8f93f4281134dfcf47de7b4588bb6074f2</id>
<content type='text'>
Changes to the port capability can be indirectly observed by tracing
register writes to DWC3_GCTL. However, this requires interpreting the
raw value, which is neither intuitive nor precise for debugging.
Monitoring these mode changes is essential for resolving issues related
to USB role switching and enumeration.

Introduce a dedicated trace event to provide a human-readable log when
the port capability is configured.

Signed-off-by: Kuen-Han Tsai &lt;khtsai@google.com&gt;
Acked-by: Thinh Nguyen &lt;Thinh.Nguyen@synopsys.com&gt;
Link: https://lore.kernel.org/r/20250822092411.173519-1-khtsai@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: Add function suspend and function wakeup support</title>
<updated>2023-03-29T08:27:01+00:00</updated>
<author>
<name>Elson Roy Serrao</name>
<email>quic_eserrao@quicinc.com</email>
</author>
<published>2023-03-24T21:48:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=92c08a84b53e5dd1f2150e870db2ae9e5a5459e1'/>
<id>urn:sha1:92c08a84b53e5dd1f2150e870db2ae9e5a5459e1</id>
<content type='text'>
USB host sends function suspend and function resume notifications to
the interface through SET_FEATURE/CLEAR_FEATURE setup packets.
Add support to handle these packets by delegating the requests to
composite layer. Also add support to handle function wake notification
requests to exit from function suspend state.

Acked-by: Thinh Nguyen &lt;Thinh.Nguyen@synopsys.com&gt;
Signed-off-by: Elson Roy Serrao &lt;quic_eserrao@quicinc.com&gt;
Link: https://lore.kernel.org/r/1679694482-16430-5-git-send-email-quic_eserrao@quicinc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: dwc3: fix memory leak with using debugfs_lookup()</title>
<updated>2023-02-06T12:46:41+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-02-02T15:28:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=be308d68785b205e483b3a0c61ba3a82da468f2c'/>
<id>urn:sha1:be308d68785b205e483b3a0c61ba3a82da468f2c</id>
<content type='text'>
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time.  To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.

Note, the root dentry for the debugfs directory for the device needs to
be saved so we don't have to keep looking it up, which required a bit
more refactoring to properly create and remove it when needed.

Reported-by: Bruce Chen &lt;bruce.chen@unisoc.com&gt;
Reported-by: Cixi Geng &lt;cixi.geng1@unisoc.com&gt;
Tested-by: Cixi Geng &lt;gengcixi@gmail.com&gt;
Acked-by: Thinh Nguyen &lt;Thinh.Nguyen@synopsys.com&gt;
Link: https://lore.kernel.org/r/20230202152820.2409908-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: debug: show events parameters in hex</title>
<updated>2022-08-19T09:03:52+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2022-07-20T21:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=37a136aac3fe265a79a9e4506ce99c1d8af7dbca'/>
<id>urn:sha1:37a136aac3fe265a79a9e4506ce99c1d8af7dbca</id>
<content type='text'>
Printing the event parameters in decimal is not useful.
Print them in hex and make it more practical.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20220720215113.1058313-1-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: debugfs: Add and remove endpoint dirs dynamically</title>
<updated>2021-06-03T18:28:23+00:00</updated>
<author>
<name>Jack Pham</name>
<email>jackp@codeaurora.org</email>
</author>
<published>2021-05-29T19:29:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8d396bb0a5b62b326f6be7594d8bd46b088296bd'/>
<id>urn:sha1:8d396bb0a5b62b326f6be7594d8bd46b088296bd</id>
<content type='text'>
The DWC3 DebugFS directory and files are currently created once
during probe.  This includes creation of subdirectories for each
of the gadget's endpoints.  This works fine for peripheral-only
controllers, as dwc3_core_init_mode() calls dwc3_gadget_init()
just prior to calling dwc3_debugfs_init().

However, for dual-role controllers, dwc3_core_init_mode() will
instead call dwc3_drd_init() which is problematic in a few ways.
First, the initial state must be determined, then dwc3_set_mode()
will have to schedule drd_work and by then dwc3_debugfs_init()
could have already been invoked.  Even if the initial mode is
peripheral, dwc3_gadget_init() happens after the DebugFS files
are created, and worse so if the initial state is host and the
controller switches to peripheral much later.  And secondly,
even if the gadget endpoints' debug entries were successfully
created, if the controller exits peripheral mode, its dwc3_eps
are freed so the debug files would now hold stale references.

So it is best if the DebugFS endpoint entries are created and
removed dynamically at the same time the underlying dwc3_eps are.
Do this by calling dwc3_debugfs_create_endpoint_dir() as each
endpoint is created, and conversely remove the DebugFS entry when
the endpoint is freed.

Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly")
Cc: stable &lt;stable@vger.kernel.org&gt;
Reviewed-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Jack Pham &lt;jackp@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210529192932.22912-1-jackp@codeaurora.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: gadget: Rename EOPF event macros to Suspend</title>
<updated>2021-05-10T12:45:49+00:00</updated>
<author>
<name>Jack Pham</name>
<email>jackp@codeaurora.org</email>
</author>
<published>2021-04-28T09:01:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6f26ebb79a84bcad211cb2d8a2ef74dfc427322d'/>
<id>urn:sha1:6f26ebb79a84bcad211cb2d8a2ef74dfc427322d</id>
<content type='text'>
The device event corresponding to End of Periodic Frame is only
found on older IP revisions (2.10a and prior, according to a
cursory SNPS databook search).  On revisions 2.30a and newer,
including DWC3.1, the same event value and corresponding DEVTEN
bit were repurposed to indicate that the link has gone into
suspend state (U3 or L2/L1).

EOPF events had never been enabled before in this driver, and
going forward we expect current and future DWC3-based devices
won't likely to be using such old DWC3 IP revisions either.
Hence rather than keeping the deprecated EOPF macro names let's
rename them to indicate their usage for suspend events.

Acked-by: Felipe Balbi &lt;balbi@kernel.org&gt;
Signed-off-by: Jack Pham &lt;jackp@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210428090111.3370-2-jackp@codeaurora.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: fix incorrect kernel-doc comment syntax in files</title>
<updated>2021-04-02T13:20:51+00:00</updated>
<author>
<name>Aditya Srivastava</name>
<email>yashsri421@gmail.com</email>
</author>
<published>2021-03-29T13:51:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=27088e00b623a9581bcd4e443a6f9380524edfce'/>
<id>urn:sha1:27088e00b623a9581bcd4e443a6f9380524edfce</id>
<content type='text'>
The opening comment mark '/**' is used for highlighting the beginning of
kernel-doc comments.
There are certain files in drivers/usb/dwc3, which follow this syntax,
but the content inside does not comply with kernel-doc.
Such lines were probably not meant for kernel-doc parsing, but are parsed
due to the presence of kernel-doc like comment syntax(i.e, '/**'), which
causes unexpected warnings from kernel-doc.

E.g., presence of kernel-doc like comment in drivers/usb/dwc3/io.h at
header causes this warnings by kernel-doc:
"warning: expecting prototype for h(). Prototype was for __DRIVERS_USB_DWC3_IO_H() instead"

Similarly for other files too.

Provide a simple fix by replacing such occurrences with general comment
format, i.e. '/*', to prevent kernel-doc from parsing it.

Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Aditya Srivastava &lt;yashsri421@gmail.com&gt;
Link: https://lore.kernel.org/r/20210329135108.27128-1-yashsri421@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: debug: fix checkpatch warning</title>
<updated>2020-10-02T06:43:35+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@kernel.org</email>
</author>
<published>2020-08-13T05:33:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=035cbca1360a105288787da41ae0c1ee1366e0b5'/>
<id>urn:sha1:035cbca1360a105288787da41ae0c1ee1366e0b5</id>
<content type='text'>
no functional changes

Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: debug: fix sparse warning</title>
<updated>2020-10-02T06:43:35+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@kernel.org</email>
</author>
<published>2020-08-13T05:24:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=27c7ab0fdd0b0e5883930b9d9d333e0209efc036'/>
<id>urn:sha1:27c7ab0fdd0b0e5883930b9d9d333e0209efc036</id>
<content type='text'>
Fix the following sparse warning:

drivers/usb/dwc3/trace.c: note: in included file (through drivers/usb/dwc3/trace.h):
drivers/usb/dwc3/debug.h:374:39: warning: cast to non-scalar

Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: Replace HTTP links with HTTPS ones</title>
<updated>2020-07-15T14:33:51+00:00</updated>
<author>
<name>Alexander A. Klimov</name>
<email>grandmaster@al2klimov.de</email>
</author>
<published>2020-07-11T13:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=10623b879da3932be313ba142d56b9f3d1216e96'/>
<id>urn:sha1:10623b879da3932be313ba142d56b9f3d1216e96</id>
<content type='text'>
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov &lt;grandmaster@al2klimov.de&gt;
Link: https://lore.kernel.org/r/20200711135804.19735-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
