<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/dwc3/debugfs.c, branch v5.4.151</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.151</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.151'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-06-23T12:41:31+00:00</updated>
<entry>
<title>usb: dwc3: debugfs: Add and remove endpoint dirs dynamically</title>
<updated>2021-06-23T12:41:31+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=d7e403eea007f47776186d4d572f234b1221e6e3'/>
<id>urn:sha1:d7e403eea007f47776186d4d572f234b1221e6e3</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: debugfs: Print/set link state for peripheral mode</title>
<updated>2018-11-26T07:06:31+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>thinh.nguyen@synopsys.com</email>
</author>
<published>2018-11-08T01:56:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d102444cac156425e1f154089eb4400ddb581629'/>
<id>urn:sha1:d102444cac156425e1f154089eb4400ddb581629</id>
<content type='text'>
Current implementation only prints/sets the link state for peripheral
mode only. Check and prevent printing bogus link state if the current
mode of operation is not peripheral.

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: dwc3: debugfs: Properly print/set link state for HS</title>
<updated>2018-11-26T07:06:31+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>thinh.nguyen@synopsys.com</email>
</author>
<published>2018-11-08T01:55:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0d36dede457873404becd7c9cb9d0f2bcfd0dcd9'/>
<id>urn:sha1:0d36dede457873404becd7c9cb9d0f2bcfd0dcd9</id>
<content type='text'>
Highspeed device and below has different state names than superspeed and
higher. Add proper checks and printouts of link states for highspeed and
below.

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: dwc3: debugfs: Dump internal LSP and ep registers</title>
<updated>2018-11-26T07:06:31+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>thinh.nguyen@synopsys.com</email>
</author>
<published>2018-11-08T01:55:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=62ba09d6bb6330d8a70e40e23891d8764663d469'/>
<id>urn:sha1:62ba09d6bb6330d8a70e40e23891d8764663d469</id>
<content type='text'>
To dump internal LSP and endpoint state debug registers, we must write
to GDBGLSPMUX register. This patch correctly dump LSP and endpoint
states from the debug registers.

If the controller is in device mode, all LSP and endpoint state
registers will be dumped via the debugfs attribute "lsp_dump". In host
mode, the user has to write the LSP number to "lsp_dump" to dump a
specific LSP selection.

Fixes: 80b776340c78 ("usb: dwc3: Dump LSP and BMU debug info")
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: dwc3: debugfs: Print eps Tx/RxFIFO in bytes</title>
<updated>2018-11-26T07:06:31+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>thinh.nguyen@synopsys.com</email>
</author>
<published>2018-11-08T01:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f874f79dc81aec0229babebd6ef04e591a548d2'/>
<id>urn:sha1:0f874f79dc81aec0229babebd6ef04e591a548d2</id>
<content type='text'>
TxFIFO and RxFIFO from GDBGFIFOSPACE are fifo depths in MDWIDTH. Convert
them into bytes for easier read.

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: dwc3: debugfs: Properly name Tx/RxFIFO</title>
<updated>2018-11-26T07:06:31+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>thinh.nguyen@synopsys.com</email>
</author>
<published>2018-11-08T01:55:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c85a1817e4ba09592964226b46305a7b9599884'/>
<id>urn:sha1:2c85a1817e4ba09592964226b46305a7b9599884</id>
<content type='text'>
The Tx/RxFIFO types in the GDBGFIFOSPACE.FIFO_QUEUE_SELECT are not
queue. Properly rename them.

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: dwc3: no need to check return value of debugfs_create functions</title>
<updated>2018-05-31T10:54:22+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-05-29T15:31:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=535c8dc5c48034c7ef4521d94603fe4d9b8dd859'/>
<id>urn:sha1:535c8dc5c48034c7ef4521d94603fe4d9b8dd859</id>
<content type='text'>
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Felipe Balbi &lt;balbi@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: Dump LSP and BMU debug info</title>
<updated>2018-03-22T08:49:02+00:00</updated>
<author>
<name>Thinh Nguyen</name>
<email>Thinh.Nguyen@synopsys.com</email>
</author>
<published>2018-03-16T22:35:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=80b776340c78cb2b5755e9a1a04add640c23b436'/>
<id>urn:sha1:80b776340c78cb2b5755e9a1a04add640c23b436</id>
<content type='text'>
Dump LSP and BMU debug info.

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: dwc3: debugfs: Re-use DEFINE_SHOW_ATTRIBUTE() macro</title>
<updated>2018-03-08T13:12:00+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2018-02-15T11:03:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d5b53c1fd5c3d57c92667c8ff644557bcdb9656'/>
<id>urn:sha1:6d5b53c1fd5c3d57c92667c8ff644557bcdb9656</id>
<content type='text'>
...instead of open coding file operations followed by custom -&gt;open()
callbacks per each attribute.

Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>USB: dwc3: Remove redundant license text</title>
<updated>2017-11-07T14:45:01+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-06T14:37:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b5ea47570b5ea4215406d55fe2cb633331f42957'/>
<id>urn:sha1:b5ea47570b5ea4215406d55fe2cb633331f42957</id>
<content type='text'>
Now that the SPDX tag is in all USB files, that identifies the license
in a specific and legally-defined manner.  So the extra GPL text wording
can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Kukjin Kim &lt;kgene@kernel.org&gt;
Cc: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Cc: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
