summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/icm.c
diff options
context:
space:
mode:
authorMika Westerberg2017-09-14 12:59:10 +0200
committerMika Westerberg2018-03-09 10:54:10 +0100
commitcb653eecde3dc37c67d3e7297ac5445d16f7be13 (patch)
treed5fea156a7155e47b7d81466b4a1372da991349f /drivers/thunderbolt/icm.c
parentthunderbolt: Wait a bit longer for ICM to authenticate the active NVM (diff)
downloadkernel-qcow2-linux-cb653eecde3dc37c67d3e7297ac5445d16f7be13.tar.gz
kernel-qcow2-linux-cb653eecde3dc37c67d3e7297ac5445d16f7be13.tar.xz
kernel-qcow2-linux-cb653eecde3dc37c67d3e7297ac5445d16f7be13.zip
thunderbolt: Handle rejected Thunderbolt devices
The ICM firmware rejects devices if the maximum topology limit is exceeded (more than 6 devices are connected). If that happens just log a message to the kernel message buffer and bail out. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Diffstat (limited to 'drivers/thunderbolt/icm.c')
-rw-r--r--drivers/thunderbolt/icm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
index 611d28e8e5f2..6d7f8262f864 100644
--- a/drivers/thunderbolt/icm.c
+++ b/drivers/thunderbolt/icm.c
@@ -410,6 +410,12 @@ icm_fr_device_connected(struct tb *tb, const struct icm_pkg_header *hdr)
ICM_LINK_INFO_DEPTH_SHIFT;
authorized = pkg->link_info & ICM_LINK_INFO_APPROVED;
+ if (pkg->link_info & ICM_LINK_INFO_REJECTED) {
+ tb_info(tb, "switch at %u.%u was rejected by ICM firmware because topology limit exceeded\n",
+ link, depth);
+ return;
+ }
+
ret = icm->get_route(tb, link, depth, &route);
if (ret) {
tb_err(tb, "failed to find route string for switch at %u.%u\n",