Deleted Added
full compact
acpi_pcib_acpi.c (234150) acpi_pcib_acpi.c (253426)
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2000 BSDi
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2000 BSDi
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: stable/9/sys/dev/acpica/acpi_pcib_acpi.c 234150 2012-04-11 20:50:17Z jhb $");
29__FBSDID("$FreeBSD: stable/9/sys/dev/acpica/acpi_pcib_acpi.c 253426 2013-07-17 14:04:18Z jhb $");
30
31#include "opt_acpi.h"
32#include <sys/param.h>
33#include <sys/bus.h>
34#include <sys/kernel.h>
35#include <sys/limits.h>
36#include <sys/malloc.h>
37#include <sys/module.h>

--- 244 unchanged lines hidden (view full) ---

282
283 ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
284
285 sc = device_get_softc(dev);
286 sc->ap_dev = dev;
287 sc->ap_handle = acpi_get_handle(dev);
288
289 /*
30
31#include "opt_acpi.h"
32#include <sys/param.h>
33#include <sys/bus.h>
34#include <sys/kernel.h>
35#include <sys/limits.h>
36#include <sys/malloc.h>
37#include <sys/module.h>

--- 244 unchanged lines hidden (view full) ---

282
283 ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
284
285 sc = device_get_softc(dev);
286 sc->ap_dev = dev;
287 sc->ap_handle = acpi_get_handle(dev);
288
289 /*
290 * Don't attach if we're not really there.
291 */
292 if (!acpi_DeviceIsPresent(dev))
293 return (ENXIO);
294
295 /*
290 * Get our segment number by evaluating _SEG.
291 * It's OK for this to not exist.
292 */
293 status = acpi_GetInteger(sc->ap_handle, "_SEG", &sc->ap_segment);
294 if (ACPI_FAILURE(status)) {
295 if (status != AE_NOT_FOUND) {
296 device_printf(dev, "could not evaluate _SEG - %s\n",
297 AcpiFormatException(status));

--- 50 unchanged lines hidden (view full) ---

348 * We only do this for domain/segment 0 in the hopes that this is
349 * only needed for old single-domain machines.
350 */
351 status = acpi_GetInteger(sc->ap_handle, "_BBN", &sc->ap_bus);
352 if (ACPI_FAILURE(status)) {
353 if (status != AE_NOT_FOUND) {
354 device_printf(dev, "could not evaluate _BBN - %s\n",
355 AcpiFormatException(status));
296 * Get our segment number by evaluating _SEG.
297 * It's OK for this to not exist.
298 */
299 status = acpi_GetInteger(sc->ap_handle, "_SEG", &sc->ap_segment);
300 if (ACPI_FAILURE(status)) {
301 if (status != AE_NOT_FOUND) {
302 device_printf(dev, "could not evaluate _SEG - %s\n",
303 AcpiFormatException(status));

--- 50 unchanged lines hidden (view full) ---

354 * We only do this for domain/segment 0 in the hopes that this is
355 * only needed for old single-domain machines.
356 */
357 status = acpi_GetInteger(sc->ap_handle, "_BBN", &sc->ap_bus);
358 if (ACPI_FAILURE(status)) {
359 if (status != AE_NOT_FOUND) {
360 device_printf(dev, "could not evaluate _BBN - %s\n",
361 AcpiFormatException(status));
356 return_VALUE (ENXIO);
362 return (ENXIO);
357 } else {
358 /* If it's not found, assume 0. */
359 sc->ap_bus = 0;
360 }
361 }
362
363 /*
364 * If this is segment 0, the bus is zero, and PCI bus 0 already

--- 198 unchanged lines hidden ---
363 } else {
364 /* If it's not found, assume 0. */
365 sc->ap_bus = 0;
366 }
367 }
368
369 /*
370 * If this is segment 0, the bus is zero, and PCI bus 0 already

--- 198 unchanged lines hidden ---