From: Lukas Wunner <lukas@wunner.de>
To: Andreas Noever <andreas.noever@gmail.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Michael Jamet <michael.jamet@intel.com>,
Yehezkel Bernat <YehezkelShB@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] thunderbolt: Skip disabled ports on tunnel establishment
Date: Sun, 9 Sep 2018 23:42:01 +0200 [thread overview]
Message-ID: <22a6630e04940f942dbcd739275141d4c6cff17d.1536517047.git.lukas@wunner.de> (raw)
In-Reply-To: <cover.1536517047.git.lukas@wunner.de>
If a PCIe downstream adapter is marked disabled in the DROM, that port
is ineligible for tunnel establishment, so skip over it when searching
for an unused port.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
---
drivers/thunderbolt/tb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index 1424581fd9af..0da2e7a06ab5 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -147,6 +147,8 @@ static struct tb_port *tb_find_unused_down_port(struct tb_switch *sw)
int res;
int data;
for (i = 1; i <= sw->config.max_port_number; i++) {
+ if (sw->ports[i].disabled)
+ continue;
if (tb_is_upstream_port(&sw->ports[i]))
continue;
if (sw->ports[i].config.type != TB_TYPE_PCIE_DOWN)
--
2.18.0
prev parent reply other threads:[~2018-09-09 21:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-09 21:42 [PATCH 0/5] Thunderbolt material for v4.20 Lukas Wunner
2018-09-09 21:42 ` [PATCH 4/5] thunderbolt: Correlate PCI devices with Thunderbolt ports Lukas Wunner
2018-09-10 9:44 ` Mika Westerberg
2018-09-13 9:43 ` Yehezkel Bernat
2018-09-13 9:57 ` Mika Westerberg
2018-09-09 21:42 ` [PATCH 3/5] thunderbolt: Move upstream_port to struct tb Lukas Wunner
2018-09-09 21:42 ` [PATCH 2/5] thunderbolt: Obtain PCI slot number from DROM Lukas Wunner
2018-09-10 9:52 ` Mika Westerberg
2018-09-09 21:42 ` [PATCH 5/5] MAINTAINERS: Add Lukas Wunner as co-maintainer of thunderbolt Lukas Wunner
2018-09-10 9:33 ` Mika Westerberg
2018-09-10 10:25 ` Lukas Wunner
2018-09-10 12:13 ` Mika Westerberg
2018-09-13 8:58 ` Mika Westerberg
2018-09-13 9:43 ` Greg Kroah-Hartman
2018-09-17 22:34 ` Andreas Noever
2018-09-19 10:16 ` Mika Westerberg
2018-09-09 21:42 ` Lukas Wunner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22a6630e04940f942dbcd739275141d4c6cff17d.1536517047.git.lukas@wunner.de \
--to=lukas@wunner.de \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.jamet@intel.com \
--cc=mika.westerberg@linux.intel.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).