From owner-svn-src-all@FreeBSD.ORG Mon Dec 14 22:28:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BACE01065670; Mon, 14 Dec 2009 22:28:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 910AF8FC18; Mon, 14 Dec 2009 22:28:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBEMSWub040718; Mon, 14 Dec 2009 22:28:32 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBEMSW1s040716; Mon, 14 Dec 2009 22:28:32 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200912142228.nBEMSW1s040716@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 14 Dec 2009 22:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200554 - head/sys/dev/fdc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2009 22:28:32 -0000 Author: jkim Date: Mon Dec 14 22:28:32 2009 New Revision: 200554 URL: http://svn.freebsd.org/changeset/base/200554 Log: Remove _FDE quirk handling as these quirks are automatically repaired by ACPICA layer since ACPICA 20091214. Modified: head/sys/dev/fdc/fdc_acpi.c Modified: head/sys/dev/fdc/fdc_acpi.c ============================================================================== --- head/sys/dev/fdc/fdc_acpi.c Mon Dec 14 22:24:04 2009 (r200553) +++ head/sys/dev/fdc/fdc_acpi.c Mon Dec 14 22:28:32 2009 (r200554) @@ -97,9 +97,7 @@ fdc_acpi_attach(device_t dev) struct fdc_data *sc; ACPI_BUFFER buf; device_t bus; - int error, fde_count, i; - ACPI_OBJECT *obj, *pkg; - uint32_t fde[ACPI_FDC_MAXDEVS]; + int error; /* Get our softc and use the same accessor as ISA. */ sc = device_get_softc(dev); @@ -128,63 +126,12 @@ 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_hintsprobe; - } - - /* Parse the output of _FDE in various ways. */ - obj = pkg = (ACPI_OBJECT *)buf.Pointer; - switch (obj->Type) { - case ACPI_TYPE_BUFFER: - /* - * The spec says _FDE should be a buffer of five 32-bit - * integers. In violation of the spec, some systems use - * five bytes instead. - */ - switch (obj->Buffer.Length) { - case ACPI_FDC_FDE_LEN: - bcopy(obj->Buffer.Pointer, fde, ACPI_FDC_FDE_LEN); - break; - case ACPI_FDC_MAXDEVS: - for (i = 0; i < ACPI_FDC_MAXDEVS; i++) - fde[i] = ((uint8_t *)obj->Buffer.Pointer)[i]; - break; - default: - device_printf(dev, "_FDE wrong length: %d\n", - obj->Buffer.Length); - error = ENXIO; - goto out_hintsprobe; - } - break; - case ACPI_TYPE_PACKAGE: - /* - * In violation of the spec, systems including the ASUS - * K8V return a package of five integers instead of a - * buffer of five 32-bit integers. - */ - fde_count = min(ACPI_FDC_MAXDEVS, pkg->Package.Count); - for (i = 0; i < fde_count; i++) { - obj = &pkg->Package.Elements[i]; - if (obj->Type == ACPI_TYPE_INTEGER) - fde[i] = (uint32_t)obj->Integer.Value; - } - break; - default: - device_printf(dev, "invalid _FDE type %d\n", obj->Type); - error = ENXIO; - goto out_hintsprobe; + error = fdc_hints_probe(dev); + goto out; } /* Add fd child devices as specified. */ - error = fdc_acpi_probe_children(bus, dev, fde); - -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); + error = fdc_acpi_probe_children(bus, dev, buf.Pointer); out: if (buf.Pointer)