From: Greg KH <gregkh@linuxfoundation.org>
To: Guan-Yu Lin <guanyulin@google.com>
Cc: mathias.nyman@intel.com, hannelotta@gmail.com,
zijun.hu@oss.qualcomm.com, xu.yang_2@nxp.com,
stern@rowland.harvard.edu, andriy.shevchenko@linux.intel.com,
ben@decadent.org.uk, quic_wcheng@quicinc.com,
krzysztof.kozlowski@linaro.org, dh10.jung@samsung.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v15 2/4] usb: offload: add apis for offload usage tracking
Date: Wed, 13 Aug 2025 16:49:57 +0200 [thread overview]
Message-ID: <2025081326-guileless-lego-ec59@gregkh> (raw)
In-Reply-To: <20250801034004.3314737-3-guanyulin@google.com>
On Fri, Aug 01, 2025 at 03:39:31AM +0000, Guan-Yu Lin wrote:
> Introduce offload_usage and corresponding apis to track offload usage
> on each USB device. Offload denotes that there is another co-processor
> accessing the USB device via the same USB host controller. To optimize
> power usage, it's essential to monitor whether the USB device is
> actively used by other co-processor. This information is vital when
> determining if a USB device can be safely suspended during system power
> state transitions.
>
> Signed-off-by: Guan-Yu Lin <guanyulin@google.com>
> ---
> drivers/usb/core/Kconfig | 10 +++
> drivers/usb/core/Makefile | 1 +
> drivers/usb/core/offload.c | 136 +++++++++++++++++++++++++++++++++++++
> drivers/usb/core/usb.c | 1 +
> include/linux/usb.h | 18 +++++
> 5 files changed, 166 insertions(+)
> create mode 100644 drivers/usb/core/offload.c
>
> diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig
> index 58e3ca7e4793..d5d38657f929 100644
> --- a/drivers/usb/core/Kconfig
> +++ b/drivers/usb/core/Kconfig
> @@ -143,3 +143,13 @@ config USB_DEFAULT_AUTHORIZATION_MODE
> ACPI selecting value 2 is analogous to selecting value 0.
>
> If unsure, keep the default value.
> +
> +config USB_OFFLOAD
> + bool "Enable USB offload feature"
I'm confused, we already have a "USB offload feature" that went into the
last kernel release, why do we need a separate config option for this as
well? Shouldn't this code only get built if the drivers that need it
select it automatically? Forcing distros to configure this isn't
generally a good idea if at all possible.
> + depends on USB
> + depends on USB_XHCI_SIDEBAND_SUSPEND
> + help
> + Offload denotes that there is another co-processor accessing the
> + USB device via the same USB host controller, creating the
> + "offloaded USB transfers". Say Y to allow offloaded USB
> + transfers during system sleep (Suspend-to-RAM).
Especially because all "desktops" do not want this code selected, so
having it in all distros feels like a waste to me.
thanks,
greg k-h
next prev parent reply other threads:[~2025-08-13 14:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-01 3:39 [PATCH v15 0/4] Support system sleep with offloaded usb transfers Guan-Yu Lin
2025-08-01 3:39 ` [PATCH v15 1/4] usb: xhci-plat: separate dev_pm_ops for each pm_event Guan-Yu Lin
2025-08-01 3:39 ` [PATCH v15 2/4] usb: offload: add apis for offload usage tracking Guan-Yu Lin
2025-08-13 14:49 ` Greg KH [this message]
2025-08-26 3:59 ` Guan-Yu Lin
2025-09-06 13:13 ` Greg KH
2025-08-01 3:39 ` [PATCH v15 3/4] xhci: sideband: add api to trace sideband usage Guan-Yu Lin
2025-08-13 14:51 ` Greg KH
2025-08-26 4:37 ` Guan-Yu Lin
2025-09-06 13:11 ` Greg KH
2025-08-01 3:39 ` [PATCH v15 4/4] usb: host: enable USB offload during system sleep Guan-Yu Lin
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=2025081326-guileless-lego-ec59@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ben@decadent.org.uk \
--cc=dh10.jung@samsung.com \
--cc=guanyulin@google.com \
--cc=hannelotta@gmail.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=quic_wcheng@quicinc.com \
--cc=stern@rowland.harvard.edu \
--cc=xu.yang_2@nxp.com \
--cc=zijun.hu@oss.qualcomm.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).