lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024100931-blabber-wilder-1ad1@gregkh>
Date: Wed, 9 Oct 2024 14:47:22 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Guan-Yu Lin <guanyulin@...gle.com>
Cc: Thinh.Nguyen@...opsys.com, mathias.nyman@...el.com,
	stern@...land.harvard.edu, elder@...nel.org, oneukum@...e.com,
	yajun.deng@...ux.dev, dianders@...omium.org, kekrby@...il.com,
	perex@...ex.cz, tiwai@...e.com, tj@...nel.org,
	stanley_chang@...ltek.com, andreyknvl@...il.com,
	christophe.jaillet@...adoo.fr, quic_jjohnson@...cinc.com,
	ricardo@...liere.net, grundler@...omium.org, niko.mauno@...sala.com,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-sound@...r.kernel.org, badhri@...gle.com,
	albertccwang@...gle.com, quic_wcheng@...cinc.com,
	pumahsu@...gle.com
Subject: Re: [PATCH v4 5/5] usb: host: enable sideband transfer during system
 sleep

On Wed, Oct 09, 2024 at 05:42:59AM +0000, Guan-Yu Lin wrote:
> Sharing a USB controller with another entity via xhci-sideband driver
> creates power management complexities. To prevent the USB controller
> from being inadvertently deactivated while in use by the other entity, a
> usage-count based mechanism is implemented. This allows the system to
> manage power effectively, ensuring the controller remains available
> whenever needed.
> 
> Signed-off-by: Guan-Yu Lin <guanyulin@...gle.com>
> ---
>  drivers/usb/core/driver.c         | 10 ++++++++++
>  drivers/usb/core/hcd.c            |  1 +
>  drivers/usb/core/usb.c            |  1 +
>  drivers/usb/dwc3/core.c           | 13 +++++++++++++
>  drivers/usb/dwc3/core.h           |  8 ++++++++
>  drivers/usb/host/xhci-plat.c      | 10 ++++++++++
>  drivers/usb/host/xhci-plat.h      |  7 +++++++
>  sound/usb/qcom/qc_audio_offload.c |  3 +++
>  8 files changed, 53 insertions(+)
> 
> diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
> index c1ba5ed15214..83726bf88fb6 100644
> --- a/drivers/usb/core/driver.c
> +++ b/drivers/usb/core/driver.c
> @@ -1583,6 +1583,11 @@ int usb_suspend(struct device *dev, pm_message_t msg)
>  	struct usb_device	*udev = to_usb_device(dev);
>  	int r;
>  
> +	if (msg.event == PM_EVENT_SUSPEND && usb_sideband_check(udev)) {
> +		dev_info(dev, "device active, skip %s", __func__);

When drivers work properly, they are quiet.  Why all of the loud
shouting in this patch as it goes about it's business?

also, __func__ is redundant in dev_*() calls :)

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ