8e0f2bf
From 613a88779bf424c9bcae20ccd9c4c04574f37554 Mon Sep 17 00:00:00 2001
8e0f2bf
From: Thomas Haller <thaller@redhat.com>
8e0f2bf
Date: Fri, 29 Sep 2017 17:08:55 +0200
8e0f2bf
Subject: [PATCH 4/5] device: fix delay startup complete for unrealized devices
8e0f2bf
8e0f2bf
Since commit 6845b9b80a9fcec9d2c9e7b56a37329f38089f2e ("device: delay
8e0f2bf
startup complete until device is initialized in platform", we also wait
8e0f2bf
for devices that are still initializing platform/UDEV.
8e0f2bf
8e0f2bf
Obviously, that only applies to realized devices.
8e0f2bf
8e0f2bf
Otherwise, an unrealized device is going to block startup complete.
8e0f2bf
8e0f2bf
Fixes: 6845b9b80a9fcec9d2c9e7b56a37329f38089f2e
8e0f2bf
(cherry picked from commit 9ad8010fe0c42291580e4a801ed85947ae660d38)
8e0f2bf
(cherry picked from commit 0ba498b17dc582dcbd9b7102e03496f391d67812)
8e0f2bf
---
8e0f2bf
 src/devices/nm-device.c | 3 ++-
8e0f2bf
 1 file changed, 2 insertions(+), 1 deletion(-)
8e0f2bf
8e0f2bf
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
8e0f2bf
index bacbfb33e..a085e466d 100644
8e0f2bf
--- a/src/devices/nm-device.c
8e0f2bf
+++ b/src/devices/nm-device.c
8e0f2bf
@@ -12030,7 +12030,8 @@ nm_device_has_pending_action (NMDevice *self)
8e0f2bf
 	if (priv->pending_actions)
8e0f2bf
 		return TRUE;
8e0f2bf
 
8e0f2bf
-	if (nm_device_get_unmanaged_flags (self, NM_UNMANAGED_PLATFORM_INIT)) {
8e0f2bf
+	if (   nm_device_is_real (self)
8e0f2bf
+	    && nm_device_get_unmanaged_flags (self, NM_UNMANAGED_PLATFORM_INIT)) {
8e0f2bf
 		/* as long as the platform link is not yet initialized, we have a pending
8e0f2bf
 		 * action. */
8e0f2bf
 		return TRUE;
8e0f2bf
-- 
8e0f2bf
2.13.6
8e0f2bf