Re: [RFD] Functional dependencies between devices

From: Alan Stern
Date: Sat Oct 31 2015 - 11:23:01 EST


On Sat, 31 Oct 2015, Rafael J. Wysocki wrote:

> > One possible approach is to have a "wait_for_driver" flag, along with a
> > timeout value (or perhaps using a fixed timeout value). When a
> > dependency gets registered with this flag set, the function call
> > wouldn't return until the target device is bound to a driver or the
> > timeout has elapsed.
> >
> > This would make it easy to insert dependencies at probe time without
> > relying on deferred probing.
>
> I'm not sure about this to be honest. It seems like implementing it might
> be sort of tricky.

Well, clearly it wouldn't work if probes were serialized and one driver
was dependent on another that was going to be probed later. But if
probes are asynchronous then it ought to be okay (unless there is a
dependency cycle, in which case the situation is hopeless anyway).

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/