mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-21 17:32:04 +00:00
bcm57xx: Make hotplug more reliable
Although hotpluggging PCIe cards isn't common, it's how I'm testing this in the device test enclosure. Add a tiny delay to wait for the kernel to populate the net class on hotplug.
This commit is contained in:
parent
a78b13fb71
commit
94e3d24f55
@ -75,6 +75,10 @@ fu_bcm57xx_device_probe (FuUdevDevice *device, GError **error)
|
||||
|
||||
/* only if has an interface */
|
||||
fn = g_build_filename (fu_udev_device_get_sysfs_path (device), "net", NULL);
|
||||
if (!g_file_test (fn, G_FILE_TEST_EXISTS)) {
|
||||
g_debug ("waiting for net devices to appear");
|
||||
g_usleep (50 * 1000);
|
||||
}
|
||||
ifaces = fu_common_filename_glob (fn, "en*", NULL);
|
||||
if (ifaces == NULL || ifaces->len == 0) {
|
||||
fu_device_add_child (FU_DEVICE (self), FU_DEVICE (self->recovery));
|
||||
|
Loading…
Reference in New Issue
Block a user