Thread (36 messages) 36 messages, 5 authors, 2016-09-06

Re: [PATCH v2 02/10] driver core: Functional dependencies tracking support

From: Rafael J. Wysocki <hidden>
Date: 2016-09-06 23:51:49
Also in: linux-arm-kernel, linux-iommu, linux-pci, linux-samsung-soc, lkml

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:
quoted
On Monday, July 25, 2016 12:48:32 AM Lukas Wunner wrote:
quoted
On Thu, Jul 21, 2016 at 02:25:15AM +0200, Rafael J. Wysocki wrote:
quoted
On Thursday, July 21, 2016 01:25:53 AM Lukas Wunner wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help