<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/dwc3/debug.h, branch v5.10.257</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.257</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.257'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-06-23T12:42:54+00:00</updated>
<entry>
<title>usb: dwc3: debugfs: Add and remove endpoint dirs dynamically</title>
<updated>2021-06-23T12:42:54+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=e52d43c82f2f6556f0b7a790c19c072c1e99a95f'/>
<id>urn:sha1:e52d43c82f2f6556f0b7a790c19c072c1e99a95f</id>
<content type='text'>
commit 8d396bb0a5b62b326f6be7594d8bd46b088296bd upstream.

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: 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>
<entry>
<title>usb: dwc3: gadget: Handle stream transfers</title>
<updated>2020-05-25T08:09:42+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>Thinh.Nguyen@synopsys.com</email>
</author>
<published>2020-05-06T02:47:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=140ca4cfea8a7aeff89c8969a4cc7ce125a04159'/>
<id>urn:sha1:140ca4cfea8a7aeff89c8969a4cc7ce125a04159</id>
<content type='text'>
Overview of stream transfer requirement:
 * A transfer will have a set of TRBs of the same stream ID.
 * A transfer is started with a stream ID in START_TRANSFER command.
 * A new stream will only start when the previous completes.

Overview of stream events:
 * A "prime" from host indicates that its endpoints are active
   (buffers prepared and ready to receive/transmit data). The controller
   automatically initiates stream if it sees this.
 * A "NoStream" rejection event indicates that the host isn't ready.
   Host will put the endpoint back to idle state. Device may need to
   reinitiate the stream to start transfer again.
 * A Stream Found event means host accepted device initiated stream.
   Nothing needs to be done from driver.

To initiate a stream, the driver will issue START_TRANSFER command with
a stream ID. To reinitiate the stream, the driver must issue
END_TRANSFER and restart the transfer with START_TRANSFER command with
the same stream ID.

This implementation handles device-initated streams (e.g. UASP driver).
It also handles some hosts' quirky behavior where they only prime each
endpoint once.

Signed-off-by: Thinh Nguyen &lt;thinhn@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: dwc3: Use the correct style for SPDX License Identifier</title>
<updated>2020-05-05T07:58:49+00:00</updated>
<author>
<name>Nishad Kamdar</name>
<email>nishadkamdar@gmail.com</email>
</author>
<published>2020-03-28T10:04:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b33f69f56352f61bba77f91b07318c5482562be8'/>
<id>urn:sha1:b33f69f56352f61bba77f91b07318c5482562be8</id>
<content type='text'>
This patch corrects the SPDX License Identifier style in
header files related to DesignWare USB3 DRD Core Support.
For C header files Documentation/process/license-rules.rst
mandates C-like comments (opposed to C source files where
C++ style should be used).

Changes made by using a script provided by Joe Perches here:
https://lkml.org/lkml/2019/2/7/46.

Suggested-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Nishad Kamdar &lt;nishadkamdar@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: debug: fix string position formatting mixup with ret and len</title>
<updated>2020-02-10T19:13:50+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2020-02-10T09:51:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b32196e35bd7bbc8038db1aba1fbf022dc469b6a'/>
<id>urn:sha1:b32196e35bd7bbc8038db1aba1fbf022dc469b6a</id>
<content type='text'>
Currently the string formatting is mixing up the offset of ret and
len. Re-work the code to use just len, remove ret and use scnprintf
instead of snprintf and len position accumulation where required.
Remove the -ve return check since scnprintf never returns a failure
-ve size. Also break overly long lines to clean up checkpatch
warnings.

Addresses-Coverity: ("Unused value")
Fixes: 1381a5113caf ("usb: dwc3: debug: purge usage of strcat")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Reviewed-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200210095139.328711-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: debug: Remove newline printout</title>
<updated>2019-10-23T06:25:08+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>Thinh.Nguyen@synopsys.com</email>
</author>
<published>2019-10-22T19:10:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=038761ce68c2354106fca276c8273351d5fe19a1'/>
<id>urn:sha1:038761ce68c2354106fca276c8273351d5fe19a1</id>
<content type='text'>
The newline from the unknown link state tracepoint doesn't follow the
other tracepoints, and it looks unsightly. Let's remove it.

Signed-off-by: Thinh Nguyen &lt;thinhn@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: common: Separated decoding functions from dwc3 driver.</title>
<updated>2019-08-29T07:52:27+00:00</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2019-08-26T11:19:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=91f255a26bce80d27b5f3dcbb0333b852b5dbe2c'/>
<id>urn:sha1:91f255a26bce80d27b5f3dcbb0333b852b5dbe2c</id>
<content type='text'>
Patch moves some decoding functions from driver/usb/dwc3/debug.h driver
to driver/usb/common/debug.c file. These moved functions include:
    dwc3_decode_get_status
    dwc3_decode_set_clear_feature
    dwc3_decode_set_address
    dwc3_decode_get_set_descriptor
    dwc3_decode_get_configuration
    dwc3_decode_set_configuration
    dwc3_decode_get_intf
    dwc3_decode_set_intf
    dwc3_decode_synch_frame
    dwc3_decode_set_sel
    dwc3_decode_set_isoch_delay
    dwc3_decode_ctrl

These functions are used also in inroduced cdns3 driver.

All functions prefixes were changed from dwc3 to usb.
Also, function's parameters has been extended according to the name
of fields in standard SETUP packet.
Additionally, patch adds usb_decode_ctrl function to
include/linux/usb/ch9.h file.

Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: debug: Print GET_STATUS(device) tracepoint</title>
<updated>2019-05-03T06:13:49+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>Thinh.Nguyen@synopsys.com</email>
</author>
<published>2019-04-25T21:06:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dd24f9b604d3bf04c23544695e1cdbdc84e0c7de'/>
<id>urn:sha1:dd24f9b604d3bf04c23544695e1cdbdc84e0c7de</id>
<content type='text'>
DWC3 is missing the printing of control request GET_STATUS(device)
tracepoint. This patch prints that.

Signed-off-by: Thinh Nguyen &lt;thinhn@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
</feed>
