linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Szuying Chen <Chloe_Chen@asmedia.com.tw>
Cc: gregkh@linuxfoundation.org, mario.limonciello@amd.com,
	andreas.noever@gmail.com, michael.jamet@intel.com,
	YehezkelShB@gmail.com, Yd_Tseng@asmedia.com.tw,
	Richard_Hsu@asmedia.com.tw, Lukas Wunner <lukas@wunner.de>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-usb@vger.kernel.org
Subject: [PATCH v9 1/6] thunderbolt: Allow NVM upgrade of USB4 host routers
Date: Mon,  5 Sep 2022 15:02:00 +0300	[thread overview]
Message-ID: <20220905120205.23025-2-mika.westerberg@linux.intel.com> (raw)
In-Reply-To: <20220905120205.23025-1-mika.westerberg@linux.intel.com>

From: Szuying Chen <Chloe_Chen@asmedia.com.tw>

Intel pre-USB4 host routers required the firmware connection manager to
be active in order to perform NVM firmware upgrade and for this reason
it was disabled when software connection manager is active. However,
this is not necessary for USB4 host routers as this functionality is
part of router operations that the router implements if it wants to
support this.

Signed-off-by: Szuying Chen <Chloe_Chen@asmedia.com.tw>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/thunderbolt/tb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index 4a659cea26f7..462845804427 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -1442,8 +1442,11 @@ static int tb_start(struct tb *tb)
 	 * ICM firmware upgrade needs running firmware and in native
 	 * mode that is not available so disable firmware upgrade of the
 	 * root switch.
+	 *
+	 * However, USB4 routers support NVM firmware upgrade if they
+	 * implement the necessary router operations.
 	 */
-	tb->root_switch->no_nvm_upgrade = true;
+	tb->root_switch->no_nvm_upgrade = !tb_switch_is_usb4(tb->root_switch);
 	/* All USB4 routers support runtime PM */
 	tb->root_switch->rpm = tb_switch_is_usb4(tb->root_switch);
 
-- 
2.35.1


  reply	other threads:[~2022-09-05 12:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05 12:01 [PATCH v9 0/6] thunderbolt: Add support for ASMedia NVM firmware image format Mika Westerberg
2022-09-05 12:02 ` Mika Westerberg [this message]
2022-09-05 12:02 ` [PATCH v9 2/6] thunderbolt: Extend NVM version fields to 32-bits Mika Westerberg
2022-09-05 12:02 ` [PATCH v9 3/6] thunderbolt: Rename and make nvm_read() available for other files Mika Westerberg
2022-09-05 12:02 ` [PATCH v9 4/6] thunderbolt: Provide tb_retimer_nvm_read() analogous to tb_switch_nvm_read() Mika Westerberg
2022-09-05 12:02 ` [PATCH v9 5/6] thunderbolt: Move vendor specific NVM handling into nvm.c Mika Westerberg
2022-09-05 12:02 ` [PATCH v9 6/6] thunderbolt: Add support for ASMedia NVM image format Mika Westerberg

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=20220905120205.23025-2-mika.westerberg@linux.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=Chloe_Chen@asmedia.com.tw \
    --cc=Richard_Hsu@asmedia.com.tw \
    --cc=Yd_Tseng@asmedia.com.tw \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mario.limonciello@amd.com \
    --cc=michael.jamet@intel.com \
    /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).