It fairly frequently happens that some newbus devices have dependencies on others. When the ordering is global, especially when they are neighbors on the same bus level, multipass can set the appropriate attach ordering. However, there are other cases when the dependency is known only at runtime (specified through a device tree, for example) or where intermediate levels of the tree do not have guaranteed order with respect to others in complicated bus topologies.
This patch introduced a new device method (DEVICE_DELAY_ATTACH()) that can be implemented by devices with these kinds of requirements. At each bus pass, the function is called and, if it returns TRUE, the device is left in DS_ALIVE (probed and claimed) but attach is not attempted. In the event of forward progress in reducing the number of pending attachments, this will be iteratively retried.
A modification to the smu(4) driver with a trivial illustration of this mechanism is included. It depends on a GPIO which, on most systems, most of the time, attaches before smu(4) as a result of happenstance in attach ordering. When using FDTs instead of Open Firmware, the node order is inverted for some reason, leading to panics without this patch.