From e45163b2162def698a0320716097091257c39dea Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 4 May 2016 23:00:57 +0000 Subject: [PATCH] Fix the acpi attachment to always start the worker thread. The previous change to split the worker thread start out of fdc_attach() did not start the worker thread if the fdc device in the ACPI namespace did not have an _FDE method. This fixes hangs when booting with a floppy controller enabled on certain machines with ACPI. Tested by: joel --- sys/dev/fdc/fdc_acpi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/fdc/fdc_acpi.c b/sys/dev/fdc/fdc_acpi.c index 9c6eb358ed61..afef4096316b 100644 --- a/sys/dev/fdc/fdc_acpi.c +++ b/sys/dev/fdc/fdc_acpi.c @@ -135,14 +135,13 @@ fdc_acpi_attach(device_t dev) obj = buf.Pointer; error = fdc_acpi_probe_children(bus, dev, obj->Buffer.Pointer); - if (error == 0) - fdc_start_worker(dev); - out: if (buf.Pointer) free(buf.Pointer, M_TEMP); if (error != 0) fdc_release_resources(sc); + else + fdc_start_worker(dev); return (error); }