[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210304123125.43630-8-mika.westerberg@linux.intel.com>
Date: Thu, 4 Mar 2021 15:31:14 +0300
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: linux-usb@...r.kernel.org
Cc: Michael Jamet <michael.jamet@...el.com>,
Yehezkel Bernat <YehezkelShB@...il.com>,
Andreas Noever <andreas.noever@...il.com>,
Isaac Hazan <isaac.hazan@...el.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Lukas Wunner <lukas@...ner.de>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Subject: [PATCH 07/18] thunderbolt: Use pseudo-random number as initial property block generation
As recommended by USB4 inter-domain service spec use pseudo-random value
instead of zero as initial XDomain property block generation value.
Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
---
drivers/thunderbolt/xdomain.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c
index a1657663a95e..cfe6fa7e84f4 100644
--- a/drivers/thunderbolt/xdomain.c
+++ b/drivers/thunderbolt/xdomain.c
@@ -12,6 +12,7 @@
#include <linux/kmod.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
+#include <linux/prandom.h>
#include <linux/utsname.h>
#include <linux/uuid.h>
#include <linux/workqueue.h>
@@ -1880,6 +1881,7 @@ int tb_xdomain_init(void)
tb_property_add_immediate(xdomain_property_dir, "deviceid", 0x1);
tb_property_add_immediate(xdomain_property_dir, "devicerv", 0x80000100);
+ xdomain_property_block_gen = prandom_u32();
return 0;
}
--
2.30.1
Powered by blists - more mailing lists