device: revert to explicit device_set_present calls
authorFelix Fietkau <nbd@nbd.name>
Tue, 3 Sep 2024 13:13:47 +0000 (15:13 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 3 Sep 2024 13:13:49 +0000 (15:13 +0200)
Works around unknown hangs exposed by the recent changes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
device.c
interface.c

index 405f4d27ebe1b0afc6d259e5e6bcc560a2f705d3..9cfb565359f9772a2e426c795df9a6ef42019448 100644 (file)
--- a/device.c
+++ b/device.c
@@ -1472,5 +1472,5 @@ void device_hotplug_event(const char *name, bool add)
        if (!dev || dev->type != &simple_device_type)
                return;
 
-       system_if_check(dev);
+       device_set_present(dev, add);
 }
index c2749592e156cc72ed8d6ac79a52e33f2da703af..69897dc2cd628c1fcf8fe213e9b2fbfe750c384b 100644 (file)
@@ -1119,7 +1119,7 @@ interface_handle_link(struct interface *iface, const char *name,
 
        interface_set_device_config(iface, dev);
        if (!link_ext)
-               system_if_check(dev);
+               device_set_present(dev, true);
 
        return interface_add_link(iface, dev, vlan, link_ext);
 }