diff mbox series

[v3,3/4] thunderbolt: Skip port init for control adapter(0)

Message ID 1628269148-51355-4-git-send-email-Sanju.Mehta@amd.com
State New
Headers show
Series Added some bug fixes for USB4 | expand

Commit Message

Sanjay R Mehta Aug. 6, 2021, 4:59 p.m. UTC
From: Sanjay R Mehta <sanju.mehta@amd.com>

Adapter (0) is control adapter and as per USB4 spec in "Section 1.8",
"Control Adapters do not have an Adapter Configuration Space".

Hence skip port initialization for adapter (0).

Fixes: e6b245ccd524 ("thunderbolt: Add support for host and device NVM firmware upgrade")
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com>
---
 drivers/thunderbolt/switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 83b1ef3..6447876 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -2740,7 +2740,7 @@  int tb_switch_add(struct tb_switch *sw)
 			return ret;
 		}
 
-		for (i = 0; i <= sw->config.max_port_number; i++) {
+		for (i = 1; i <= sw->config.max_port_number; i++) {
 			if (sw->ports[i].disabled) {
 				tb_port_dbg(&sw->ports[i], "disabled by eeprom\n");
 				continue;