On Thu, 2012-09-06 at 00:18 +0100, Alan Cox wrote: > > But then you have cases where probe() -> register_with_my_subsystem() -> > > open(). Network devices come to mind. IE. udev must be able to deal with > > a synchronous firmware load from probe I'm afraid. > > I don't believe so. You have > > begin probe > find match .. .firmware_name is set > issue firmware load request > set defer flag > end probe > > Later.. > > firmware load complete > kick probe up arse > > begin probe > find match .. .firmware is loaded > call ->probe() > register > open > happiness > end probe
Ok, so this is my fault for picking the thread half way through and missing the crucial point ... deferring probe() itself. BTW. Deferring probe is useful for other things. I've long advocated this as a way to deal with various soft dependencies between services for example. Cases of a driver hooking up to two or 3 different busses, and wanting all the bits to be actually probed & connected to each other in order, that sort of thing. This can be done by defining the initialization order, have the "late" ones defer when the depend aren't initialized yet, and kick probe arse from bus notifiers (tho that could be moved to the core via some helpers). Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/