* 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
This commit is contained in:
Axel Dörfler
2008-10-21 12:38:00 +00:00
parent 53892c92a0
commit 154fe8497c
+14 -8
View File
@@ -990,20 +990,26 @@ AcpiOsValidateAddress(UINT8 SpaceId, ACPI_PHYSICAL_ADDRESS Address,
*****************************************************************************/ *****************************************************************************/
ACPI_STATUS ACPI_STATUS
AcpiOsReadPciConfiguration(ACPI_PCI_ID *PciId, UINT32 Register, void *Value, AcpiOsReadPciConfiguration(ACPI_PCI_ID *pciId, UINT32 offset, void *value,
UINT32 Width) UINT32 width)
{ {
#ifdef _KERNEL_MODE #ifdef _KERNEL_MODE
UINT32 val = gPCIManager->read_pci_config( 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(); DEBUG_FUNCTION();
switch (Width) { switch (width) {
case 8: *(UINT8 *)Value = val; case 8:
case 16: *(UINT16 *)Value = val; *(UINT8 *)value = val;
case 32: *(UINT32 *)Value = val; break;
case 16:
*(UINT16 *)value = val;
break;
case 32:
*(UINT32 *)value = val;
break;
default: default:
dprintf("AcpiOsReadPciConfiguration unhandled value width: %u\n", dprintf("AcpiOsReadPciConfiguration unhandled value width: %u\n",
Width); width);
return AE_ERROR; return AE_ERROR;
} }