<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/thunderbolt/debugfs.c, branch linux-5.10.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>thunderbolt: Add uaccess dependency to debugfs interface</title>
<updated>2020-11-05T10:32:46+00:00</updated>
<author>
<name>Casey Bowman</name>
<email>casey.g.bowman@intel.com</email>
</author>
<published>2020-10-07T23:13:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=77455129fb5b2a8749330b2b40d0c8750b6bf076'/>
<id>77455129fb5b2a8749330b2b40d0c8750b6bf076</id>
<content type='text'>
Some calls in the debugfs interface are made to the linux/uaccess.h header,
but the header is not referenced. So, for x86_64 architectures, this
dependency seems to be pulled in elsewhere, which leads to a successful
compilation. However, on arm/arm64 architectures, it was found to error out
on implicit declarations.

This change fixes the implicit declaration error by adding the
linux/uaccess.h header.

Fixes: 54e418106c76 ("thunderbolt: Add debugfs interface")
Signed-off-by: Casey Bowman &lt;casey.g.bowman@intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some calls in the debugfs interface are made to the linux/uaccess.h header,
but the header is not referenced. So, for x86_64 architectures, this
dependency seems to be pulled in elsewhere, which leads to a successful
compilation. However, on arm/arm64 architectures, it was found to error out
on implicit declarations.

This change fixes the implicit declaration error by adding the
linux/uaccess.h header.

Fixes: 54e418106c76 ("thunderbolt: Add debugfs interface")
Signed-off-by: Casey Bowman &lt;casey.g.bowman@intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>thunderbolt: debugfs: Fix uninitialized return in counters_write()</title>
<updated>2020-09-10T16:39:56+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-09-10T10:08:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=77e4907fa620af102f4571d4edb0dcc95b4fa083'/>
<id>77e4907fa620af102f4571d4edb0dcc95b4fa083</id>
<content type='text'>
If the first line is in an invalid format then the "ret" value is
uninitialized.  We should return -EINVAL instead.

Fixes: 54e418106c76 ("thunderbolt: Add debugfs interface")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the first line is in an invalid format then the "ret" value is
uninitialized.  We should return -EINVAL instead.

Fixes: 54e418106c76 ("thunderbolt: Add debugfs interface")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>thunderbolt: Add debugfs interface</title>
<updated>2020-09-03T09:21:08+00:00</updated>
<author>
<name>Gil Fine</name>
<email>gil.fine@intel.com</email>
</author>
<published>2020-06-29T17:30:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=54e418106c765c5f3c378c770b0f8518632830da'/>
<id>54e418106c765c5f3c378c770b0f8518632830da</id>
<content type='text'>
This adds debugfs interface that can be used for debugging possible
issues in hardware/software. It exposes router and adapter config spaces
through files like this:

  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/regs
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT1&gt;/regs
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT1&gt;/path
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT1&gt;/counters
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT2&gt;/regs
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT2&gt;/path
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT2&gt;/counters
  ...

The "regs" is either the router or port configuration space register
dump. The "path" is the port path configuration space and "counters" is
the optional counters configuration space.

These files contains one register per line so it should be easy to use
normal filtering tools to find the registers of interest if needed.

The router and adapter regs file becomes writable when
CONFIG_USB4_DEBUGFS_WRITE is enabled (which is not supposed to be done
in production systems) and in this case the developer can write "offset
value" lines there to modify the hardware directly. For convenience this
also supports the long format the read side produces (but ignores the
additional fields). The counters file can be written even when
CONFIG_USB4_DEBUGFS_WRITE is not enabled and it is only used to clear
the counter values.

Signed-off-by: Gil Fine &lt;gil.fine@intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds debugfs interface that can be used for debugging possible
issues in hardware/software. It exposes router and adapter config spaces
through files like this:

  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/regs
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT1&gt;/regs
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT1&gt;/path
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT1&gt;/counters
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT2&gt;/regs
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT2&gt;/path
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT2&gt;/counters
  ...

The "regs" is either the router or port configuration space register
dump. The "path" is the port path configuration space and "counters" is
the optional counters configuration space.

These files contains one register per line so it should be easy to use
normal filtering tools to find the registers of interest if needed.

The router and adapter regs file becomes writable when
CONFIG_USB4_DEBUGFS_WRITE is enabled (which is not supposed to be done
in production systems) and in this case the developer can write "offset
value" lines there to modify the hardware directly. For convenience this
also supports the long format the read side produces (but ignores the
additional fields). The counters file can be written even when
CONFIG_USB4_DEBUGFS_WRITE is not enabled and it is only used to clear
the counter values.

Signed-off-by: Gil Fine &lt;gil.fine@intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
