aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2018-05-15 09:04:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-15 12:02:00 -0400
commitdd010bd7af6248b40ab31640a6e31fbebea5aa22 (patch)
tree9aa7f8dd4f44d020f31d7af6213bdb4190663101
parent6da6c0db5316275015e8cc2959f12a17584aeb64 (diff)
thunderbolt: Handle NULL boot ACL entries properly
If the boot ACL entry is already NULL we should not fill in the upper two DWs with 0xfffffffff. Otherwise they are not shown as empty entries when the sysfs attribute is read. Fixes: 9aaa3b8b4c56 ("thunderbolt: Add support for preboot ACL") Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Yehezkel Bernat <yehezkelshb@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/thunderbolt/icm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
index 2d2ceda9aa26..500911f16498 100644
--- a/drivers/thunderbolt/icm.c
+++ b/drivers/thunderbolt/icm.c
@@ -1255,7 +1255,7 @@ static int icm_ar_get_boot_acl(struct tb *tb, uuid_t *uuids, size_t nuuids)
1255 /* Map empty entries to null UUID */ 1255 /* Map empty entries to null UUID */
1256 uuid[0] = 0; 1256 uuid[0] = 0;
1257 uuid[1] = 0; 1257 uuid[1] = 0;
1258 } else { 1258 } else if (uuid[0] != 0 || uuid[1] != 0) {
1259 /* Upper two DWs are always one's */ 1259 /* Upper two DWs are always one's */
1260 uuid[2] = 0xffffffff; 1260 uuid[2] = 0xffffffff;
1261 uuid[3] = 0xffffffff; 1261 uuid[3] = 0xffffffff;