From 3793e610ff87a0e982b946fb512883efc2a352a3 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 29 Sep 2004 19:08:34 +0000 Subject: Only fall back to probing the floppy drives via hints if there is a failure in the actual _FDE parsing. If the failure occurs earlier such as in fdc_attach() then don't try to probe any drives. MFC after: 3 days Reviewed by: njl Tested by: Christian Laursen xi at borderworlds dot dk --- sys/dev/fdc/fdc_acpi.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'sys') diff --git a/sys/dev/fdc/fdc_acpi.c b/sys/dev/fdc/fdc_acpi.c index 89a5a5d..6a3cacd 100644 --- a/sys/dev/fdc/fdc_acpi.c +++ b/sys/dev/fdc/fdc_acpi.c @@ -130,7 +130,7 @@ fdc_acpi_attach(device_t dev) bus = device_get_parent(dev); if (ACPI_FAILURE(ACPI_EVALUATE_OBJECT(bus, dev, "_FDE", NULL, &buf))) { error = ENXIO; - goto out; + goto out_hintsprobe; } /* Parse the output of _FDE in various ways. */ @@ -154,7 +154,7 @@ fdc_acpi_attach(device_t dev) device_printf(dev, "_FDE wrong length: %d\n", obj->Buffer.Length); error = ENXIO; - goto out; + goto out_hintsprobe; } break; case ACPI_TYPE_PACKAGE: @@ -173,17 +173,21 @@ fdc_acpi_attach(device_t dev) default: device_printf(dev, "invalid _FDE type %d\n", obj->Type); error = ENXIO; - goto out; + goto out_hintsprobe; } /* Add fd child devices as specified. */ error = fdc_acpi_probe_children(bus, dev, fde); -out: - /* If there was a problem, fall back to the hints-based probe. */ +out_hintsprobe: + /* + * If there was a problem with the _FDE drive enumeration, fall + * back to the hints-based probe. + */ if (error) error = fdc_hints_probe(dev); +out: if (buf.Pointer) free(buf.Pointer, M_TEMP); if (error != 0) -- cgit v1.1