From 154fe8497ce3b9fa26e8a8d7554f9f783c310b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 21 Oct 2008 12:38:00 +0000 Subject: [PATCH] * AcpiOsReadPciConfiguration() always return AE_ERROR as all "break"s were missing. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28263 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/bus_managers/acpi/oshaiku.c | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/add-ons/kernel/bus_managers/acpi/oshaiku.c b/src/add-ons/kernel/bus_managers/acpi/oshaiku.c index 0609eaf6d6..79d5cf526b 100644 --- a/src/add-ons/kernel/bus_managers/acpi/oshaiku.c +++ b/src/add-ons/kernel/bus_managers/acpi/oshaiku.c @@ -990,20 +990,26 @@ AcpiOsValidateAddress(UINT8 SpaceId, ACPI_PHYSICAL_ADDRESS Address, *****************************************************************************/ ACPI_STATUS -AcpiOsReadPciConfiguration(ACPI_PCI_ID *PciId, UINT32 Register, void *Value, - UINT32 Width) +AcpiOsReadPciConfiguration(ACPI_PCI_ID *pciId, UINT32 offset, void *value, + UINT32 width) { #ifdef _KERNEL_MODE UINT32 val = gPCIManager->read_pci_config( - PciId->Bus, PciId->Device, PciId->Function, Register, Width / 8); + pciId->Bus, pciId->Device, pciId->Function, offset, width / 8); DEBUG_FUNCTION(); - switch (Width) { - case 8: *(UINT8 *)Value = val; - case 16: *(UINT16 *)Value = val; - case 32: *(UINT32 *)Value = val; + switch (width) { + case 8: + *(UINT8 *)value = val; + break; + case 16: + *(UINT16 *)value = val; + break; + case 32: + *(UINT32 *)value = val; + break; default: dprintf("AcpiOsReadPciConfiguration unhandled value width: %u\n", - Width); + width); return AE_ERROR; }