Received: by 10.192.165.148 with SMTP id m20csp880745imm; Fri, 27 Apr 2018 09:00:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqLLsAB2E+k2KuUPLPHE/VJuZCNTY15Y4kod0GnCND34UiXrsP5MfdmL2eWH5+w4UhKHnTQ X-Received: by 2002:a17:902:781:: with SMTP id 1-v6mr2830734plj.150.1524844830377; Fri, 27 Apr 2018 09:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524844830; cv=none; d=google.com; s=arc-20160816; b=jTmnV5gvSgMzFAouQlYHrdEo0QtiDFNrEnLa3239uja1EjagRTPFidHW+DbfzL5csb 1SC6NYLnnf8oKoQMQ7xwFmAuHCLmAutOQz9v4Uh6SjJP03HVdiFroT1kIq2kNDV2dg3M 0XQOsM8Kgr8BDS8RcSVLPAho5tpq3xXzPqmkxyGUeqyge3wHxhVdfeToVmCMAXtuUGRC oFbyDLiBgJSDccMu9LhQGfR4RBkKsjNvZO8poVCMazQtRb8615IduiOaBRzYznbukxh8 laMyYDUcljxBK/48FbAyvziICdut9hyIQvDtzlTIbq4blamS1xpakU2dQvBFeirG64Xv dB6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=WLpGfIaI1eX6RMALNvY/JJ2Ev+Te3Cm13/ejUNG+2Y8=; b=m69DgD6kEKt31PvmJnMh2FBFdrgloGMbz19FQEODhaKPB0y5l2fdccsq4AzVeHJalk yo17w/msITYSuj886hloEZlqEw0y+hhV/f6+ujRmkyNG06Jjldpfvvj56RS3vjNrZYfm Qxo2IEu++siowehceqTzPSe4iddCjmJDYZm0T32bJZw7mlY5xBRjuBIacFIdd4RgpuaH azMTTQ9VqAbrI4J/IVqUig8ScNGyrICyYx8ov3wvpzDbH7yFXmO7k5CM/Jj2rC9TfwMH 6j8vkNI0aDaDHRO/SE37iwjytarTsoeRO5zGgzpZFyCDcJHcSXW0yT5eZbm+OqOd9iUD wKEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g125-v6si1412418pgc.568.2018.04.27.09.00.15; Fri, 27 Apr 2018 09:00:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932994AbeD0P64 (ORCPT + 99 others); Fri, 27 Apr 2018 11:58:56 -0400 Received: from mga03.intel.com ([134.134.136.65]:34219 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932851AbeD0P6y (ORCPT ); Fri, 27 Apr 2018 11:58:54 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Apr 2018 08:58:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,335,1520924400"; d="scan'208";a="223897704" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 27 Apr 2018 08:58:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 34AF8F5; Fri, 27 Apr 2018 18:58:51 +0300 (EEST) From: Mika Westerberg To: linux-kernel@vger.kernel.org Cc: Andreas Noever , Michael Jamet , Yehezkel Bernat , Mika Westerberg Subject: [PATCH] thunderbolt: Handle NULL boot ACL entries properly Date: Fri, 27 Apr 2018 18:58:51 +0300 Message-Id: <20180427155851.16402-1-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/thunderbolt/icm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c index 2d2ceda9aa26..aec6a82989d8 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) /* Map empty entries to null UUID */ uuid[0] = 0; uuid[1] = 0; - } else { + } else if (uuid[0] != 0 && uuid[1] != 0) { /* Upper two DWs are always one's */ uuid[2] = 0xffffffff; uuid[3] = 0xffffffff; -- 2.17.0