From: Gil Fine <gil.fine@intel.com>
To: andreas.noever@gmail.com, michael.jamet@intel.com,
mika.westerberg@linux.intel.com, YehezkelShB@gmail.com
Cc: gil.fine@intel.com, linux-usb@vger.kernel.org, lukas@wunner.de
Subject: [PATCH 2/6] thunderbolt: CLx disable before system suspend only if previously enabled
Date: Mon, 9 May 2022 23:16:52 +0300 [thread overview]
Message-ID: <20220509201656.502-3-gil.fine@intel.com> (raw)
In-Reply-To: <20220509201656.502-1-gil.fine@intel.com>
Disable CLx before system suspended only if previously was enabled.
Signed-off-by: Gil Fine <gil.fine@intel.com>
---
drivers/thunderbolt/switch.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index ac87e8b50e52..549523c9a543 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -3063,8 +3063,10 @@ void tb_switch_suspend(struct tb_switch *sw, bool runtime)
* Actually only needed for Titan Ridge but for simplicity can be
* done for USB4 device too as CLx is re-enabled at resume.
*/
- if (tb_switch_disable_clx(sw, TB_CL0S))
- tb_sw_warn(sw, "failed to disable CLx on upstream port\n");
+ if (tb_switch_is_clx_enabled(sw)) {
+ if (tb_switch_disable_clx(sw, TB_CL0S))
+ tb_sw_warn(sw, "failed to disable CLx on upstream port\n");
+ }
err = tb_plug_events_active(sw, false);
if (err)
--
2.17.1
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
next prev parent reply other threads:[~2022-05-09 20:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 20:16 [PATCH v2 0/6] thunderbolt: CL1 support for USB4 and Titan Ridge Gil Fine
2022-05-09 20:16 ` [PATCH 1/6] thunderbolt: Silently ignore CLx enabling in case CLx is not supported Gil Fine
2022-05-09 20:16 ` Gil Fine [this message]
2022-05-09 20:16 ` [PATCH 3/6] thunderbolt: Fix typos in CLx enabling Gil Fine
2022-05-09 20:16 ` [PATCH 4/6] thunderbolt: Change downstream router's TMU rate in both TMU uni/bidir mode Gil Fine
2022-05-09 20:16 ` [PATCH 5/6] thunderbolt: Add CL1 support for USB4 and Titan Ridge routers Gil Fine
2022-05-09 20:16 ` [PATCH 6/6] thunderbolt: Change TMU mode to HiFi uni-directional once DisplayPort tunneled Gil Fine
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=20220509201656.502-3-gil.fine@intel.com \
--to=gil.fine@intel.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=michael.jamet@intel.com \
--cc=mika.westerberg@linux.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).