From: "mika.westerberg@linux.intel.com" <mika.westerberg@linux.intel.com>
To: "Khandelwal, Rajat" <rajat.khandelwal@intel.com>
Cc: "bleung@google.com" <bleung@google.com>,
"Malani, Prashant" <pmalani@google.com>,
"jthies@google.com" <jthies@google.com>,
"Rao, Abhijeet" <abhijeet.rao@intel.com>,
"Regupathy, Rajaram" <rajaram.regupathy@intel.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] USB4/TBT device routers should wake up during S0ix when something gets connected/disconnected or a DP monitor gets plugged in
Date: Wed, 23 Mar 2022 12:30:45 +0200 [thread overview]
Message-ID: <Yjr21UzWmj4NjItA@lahna> (raw)
In-Reply-To: <CO1PR11MB48357FE72D34818360D2105E96189@CO1PR11MB4835.namprd11.prod.outlook.com>
Hi,
If you want it to be woken up when something is plugged to the USB4 port
then I suggest to add this to the "wakeup" capability of the usb4_port
itself (see drivers/thunderbolt/usb4_port.c). And make it disabled by
default too.
On Wed, Mar 23, 2022 at 10:26:37AM +0000, Khandelwal, Rajat wrote:
> +Mika
> @Malani, Prashant @bleung@google.com This is the patch which fixes the partner issue. Kindly escalate your thoughts.
>
> Thanks
> Rajat
>
> -----Original Message-----
> From: Khandelwal, Rajat <rajat.khandelwal@intel.com>
> Sent: Wednesday, March 23, 2022 3:48 PM
> To: mika.westerberg@linux.intel.com
> Cc: Khandelwal, Rajat <rajat.khandelwal@intel.com>; bleung@google.com; jthies@google.com; Malani, Prashant <pmalani@google.com>; Rao, Abhijeet <abhijeet.rao@intel.com>; Regupathy, Rajaram <rajaram.regupathy@intel.com>; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] USB4/TBT device routers should wake up during S0ix when something gets connected/disconnected or a DP monitor gets plugged in
>
> Device routers don't wake up during S0ix when something is plugged in/out or if a DP monitor gets connected. This causes the linux device to not wake up during S0ix cycling as the host router didn't wake up because the device router didn't. This patch adds a new functionality to linux.
>
> Signed-off-by: Rajat-Khandelwal <rajat.khandelwal@intel.com>
> ---
> drivers/thunderbolt/switch.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index d026e305fe5d..4f8056724aa4 100644
> --- a/drivers/thunderbolt/switch.c
> +++ b/drivers/thunderbolt/switch.c
> @@ -3067,13 +3067,11 @@ void tb_switch_suspend(struct tb_switch *sw, bool runtime)
> tb_switch_suspend(port->remote->sw, runtime);
> }
>
> - if (runtime) {
> + if (runtime || device_may_wakeup(&sw->dev)) {
> /* Trigger wake when something is plugged in/out */
> flags |= TB_WAKE_ON_CONNECT | TB_WAKE_ON_DISCONNECT;
> flags |= TB_WAKE_ON_USB4;
> flags |= TB_WAKE_ON_USB3 | TB_WAKE_ON_PCIE | TB_WAKE_ON_DP;
> - } else if (device_may_wakeup(&sw->dev)) {
> - flags |= TB_WAKE_ON_USB4 | TB_WAKE_ON_USB3 | TB_WAKE_ON_PCIE;
> }
>
> tb_switch_set_wake(sw, flags);
> --
> 2.17.1
next prev parent reply other threads:[~2022-03-23 10:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220323101818.3503-1-rajat.khandelwal@intel.com>
2022-03-23 10:26 ` Khandelwal, Rajat
2022-03-23 10:30 ` mika.westerberg [this message]
2022-03-23 18:11 ` Khandelwal, Rajat
2022-03-23 14:30 ` Benson Leung
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=Yjr21UzWmj4NjItA@lahna \
--to=mika.westerberg@linux.intel.com \
--cc=abhijeet.rao@intel.com \
--cc=bleung@google.com \
--cc=jthies@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pmalani@google.com \
--cc=rajaram.regupathy@intel.com \
--cc=rajat.khandelwal@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
all inboxes | Powered by JetHome®