]> git.baikalelectronics.ru Git - kernel.git/commit
thunderbolt: debugfs: Show all accessible dwords
authorGil Fine <gil.fine@intel.com>
Tue, 9 Mar 2021 09:23:30 +0000 (11:23 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 12 Mar 2021 10:13:34 +0000 (13:13 +0300)
commitda50aa825dd3a5f8b1a7f4496dca88f6c9ee10a1
tree120f43347c1416952b59c49ec6615370cda23e1d
parent241716790280bc78a633ba5775294311589596d3
thunderbolt: debugfs: Show all accessible dwords

Currently, when first failure occurs while reading of the block,
we stop reading the block and jump to the next capability.
This doesn't cover the case of block with "holes" of inaccessible
dwords, followed by accessible dwords.
This patch address this problem.
In case of failure while reading the complete block in one transaction,
(because of one or more dwords is inaccessible), we read the remaining
dwords of the block dword-by-dword, one dword per transaction,
till the end of the block.
By doing this, we handle the case of block with "holes" of inaccessible
dwords, followed by accessible dwords. The accessible dwords are shown
with the fields: <offset> <relative_offset> <cap_id> <vs_cap_id> <value>
E.g.:
0x01eb  236 0x05 0x06 0x0000d166
While the inaccesible dwords are shown as: <offset> <not accessible>
E.g.:
0x01ed <not accessible>

Signed-off-by: Gil Fine <gil.fine@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/debugfs.c