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]
Date:	Fri, 28 Feb 2014 12:41:31 -0800
From:	Dan Williams <dan.j.williams@...el.com>
To:	Sarah Sharp <sarah.a.sharp@...ux.intel.com>
Cc:	Alan Stern <stern@...land.harvard.edu>,
	Mathias Nyman <mathias.nyman@...ux.intel.com>,
	USB list <linux-usb@...r.kernel.org>,
	david.a.cohen@...ux.intel.com,
	Jianqiang Tang <jianqiang.tang@...el.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v2] xhci: Prevent runtime pm from autosuspending
 during initialization

On Fri, Feb 28, 2014 at 12:32 PM, Sarah Sharp
<sarah.a.sharp@...ux.intel.com> wrote:
> On Mon, Feb 24, 2014 at 12:44:46PM -0500, Alan Stern wrote:
>> On Mon, 24 Feb 2014, Mathias Nyman wrote:
>>
>> > xHCI driver has its own pci probe function that will call usb_hcd_pci_probe
>> > to register its usb-2 bus, and then continue to manually register the
>> > usb-3 bus. usb_hcd_pci_probe does a pm_runtime_put_noidle at the end and
>> > might thus trigger a runtime suspend before the usb-3 bus is ready.
>> >
>> > Prevent the runtime suspend by increasing the usage count in the
>> > beginning of xhci_pci_probe, and decrease it once the usb-3 bus is
>> > ready.
>> >
>> > xhci-platform driver is not using usb_hcd_pci_probe to set up
>> > busses and should not need to have it's usage count increased during probe.
>> >
>> > Signed-off-by: Mathias Nyman <mathias.nyman@...ux.intel.com>
>> > ---
>> >  drivers/usb/host/xhci-pci.c | 11 ++++++++++-
>> >  1 file changed, 10 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
>> > index 04f986d..ea7158b 100644
>> > --- a/drivers/usb/host/xhci-pci.c
>> > +++ b/drivers/usb/host/xhci-pci.c
>> > @@ -190,6 +190,10 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
>> >     struct usb_hcd *hcd;
>> >
>> >     driver = (struct hc_driver *)id->driver_data;
>> > +
>> > +   /* Prevent USB-2 roothub runtime suspend until USB-3 is initialized. */
>> > +   pm_runtime_get_noresume(&dev->dev);
>>
>> Strictly speaking, this prevents the _controller_ from going into
>> runtime suspend -- not the root hub.
>
> Signed-off-by: Sarah Sharp <sarah.a.sharp@...ux.intel.com>

Pardon the nitpick, but this is an acked-by if Mathias is submitting.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ