summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-09-29 19:08:34 +0000
committerjhb <jhb@FreeBSD.org>2004-09-29 19:08:34 +0000
commit3793e610ff87a0e982b946fb512883efc2a352a3 (patch)
treef414c65394dbd918c3e4fc9eae781571c083f470 /sys
parentf3ac83fdb2c137f335f17e11307545a6b9286811 (diff)
downloadFreeBSD-src-3793e610ff87a0e982b946fb512883efc2a352a3.zip
FreeBSD-src-3793e610ff87a0e982b946fb512883efc2a352a3.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/fdc/fdc_acpi.c14
1 files changed, 9 insertions, 5 deletions
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)
OpenPOWER on IntegriCloud