- /*
- * Segment
- * -------
- * Obtained via _SEG, if exists, otherwise assumed to be zero (0).
- */
- status = acpi_evaluate_integer(device->handle, METHOD_NAME__SEG, NULL,
- &value);
- switch (status) {
- case AE_OK:
- root->id.segment = (u16) value;
- break;
- case AE_NOT_FOUND:
- ACPI_DEBUG_PRINT((ACPI_DB_INFO,
- "Assuming segment 0 (no _SEG)\n"));
- root->id.segment = 0;
- break;
- default:
- ACPI_EXCEPTION((AE_INFO, status, "Evaluating _SEG"));
- result = -ENODEV;
- goto end;
- }
-
- /*
- * Bus
- * ---
- * Check _CRS first, then _BBN. If no _BBN, default to zero.
- */
- status = try_get_root_bridge_busnr(device->handle, &bus);
- if (ACPI_SUCCESS(status))
- root->id.bus = bus;
- else {
- status = acpi_evaluate_integer(device->handle, METHOD_NAME__BBN, NULL, &value);
- if (ACPI_SUCCESS(status))
- root->id.bus = (u16) value;
- else if (status == AE_NOT_FOUND)
- root->id.bus = 0;
- else {
- ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BBN"));
- result = -ENODEV;
- goto end;
- }
- }
-