[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1546158.G8Vnv1pldV@vostro.rjw.lan>
Date: Wed, 07 Sep 2016 01:57:11 +0200
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Lukas Wunner <lukas@...ner.de>
Cc: Marek Szyprowski <m.szyprowski@...sung.com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:AMD IOMMU (AMD-VI)" <iommu@...ts.linux-foundation.org>,
linux-samsung-soc@...r.kernel.org,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Joerg Roedel <joro@...tes.org>,
Inki Dae <inki.dae@...sung.com>, Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Mark Brown <broonie@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andreas Noever <andreas.noever@...il.com>,
linux-pci@...r.kernel.org
Subject: Re: [PATCH v2 02/10] driver core: Functional dependencies tracking support
On Thursday, July 28, 2016 05:28:31 PM Lukas Wunner wrote:
> On Thu, Jul 28, 2016 at 02:30:31AM +0200, Rafael J. Wysocki wrote:
> > On Monday, July 25, 2016 12:48:32 AM Lukas Wunner wrote:
> > > On Thu, Jul 21, 2016 at 02:25:15AM +0200, Rafael J. Wysocki wrote:
> > > > On Thursday, July 21, 2016 01:25:53 AM Lukas Wunner wrote:
> > > > > I guess I could amend portdrv to return -EPROBE_DEFER on Macs if
> > > > > no driver is bound to the NHI. Doesn't feel pretty to me though.
> > > > >
> > > > > Ultimately this seems to be the same issue as with calling
> > > > > dev_pm_domain_set() for a bound device. Perhaps device_link_add()
> > > > > can likewise be allowed if a runtime PM ref is held for the devices
> > > > > and the call happens under lock_system_sleep()?
> > > >
> > > > No, the whole synchronization scheme in the links code would have had to be
> > > > changed for that to really work.
> > > >
> > > > And it really is about what is needed (at least in principle) to run your
> > > > device. If you think you need device X with a driver to handle device Y
> > > > correctly, then either you need it all the time, from probe to remove, or
> > > > you just don't really need it at all.
> > >
> > > Real life isn't as simple as that.
> > >
> > > In this case, we have consumers (hotplug ports) which are doing fine
> > > if the driver for the supplier (NHI) is not loaded. But once it loads,
> > > the links must be in place.
> >
> > Hmm.
> >
> > What if it is not loaded and the system suspends. Will everything work
> > as expected after the subsequent resume?
>
> The short answer is yes.
OK
I think it's possible to add a link flag to address this case.
Namely, if that flag is passed to device_link_add(), the link will be
added in the DEVICE_LINK_ACTIVE state right away, but that will need to
be synchronized against all possible transitions of the consumer device
(at least).
It's better to do that in a separate patch for this reason IMO.
Thanks,
Rafael
Powered by blists - more mailing lists