thunderbolt: debugfs: Handle fail reading block
authorGil Fine <gil.fine@intel.com>
Tue, 16 Feb 2021 13:04:26 +0000 (15:04 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 8 Mar 2021 10:41:40 +0000 (13:41 +0300)
commit815f421b6f6d1aedc3ebc73bf46887e02e4349fd
tree9f10590e393d54808beddf4925352ef4ef20e8f3
parenta38fd8748464831584a19438cbb3082b5a2dab15
thunderbolt: debugfs: Handle fail reading block

There are cases when reading block of dwords in single transaction fail,
for several reasons, mostly if HW publish to implement all of the dwords,
while actually it doesn't or if some dwords not accessible for read
for security reasons. We handle these cases by trying to read the block,
dword-by-dword, one dword per transaction, till we get a failure.

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