diff --git a/reactos/drivers/bus/pci/pci.c b/reactos/drivers/bus/pci/pci.c index 89978385723..a246e1b69e8 100644 --- a/reactos/drivers/bus/pci/pci.c +++ b/reactos/drivers/bus/pci/pci.c @@ -1,4 +1,4 @@ -/* $Id: pci.c,v 1.2 2002/05/05 14:57:45 chorns Exp $ +/* $Id: pci.c,v 1.3 2003/04/26 07:06:55 hbirr Exp $ * * PROJECT: ReactOS PCI Bus driver * FILE: pci.c @@ -68,7 +68,7 @@ PciReadConfigUshort(UCHAR Bus, { case pbtType1: WRITE_PORT_ULONG((PULONG)0xCF8, CONFIG_CMD(Bus, Slot, Offset)); - *Value = READ_PORT_USHORT((PUSHORT)0xCFC + (Offset & 1)); + *Value = READ_PORT_USHORT((PUSHORT)0xCFC + (Offset & 2)); return STATUS_SUCCESS; case pbtType2: @@ -150,7 +150,7 @@ PciWriteConfigUshort(UCHAR Bus, { case pbtType1: WRITE_PORT_ULONG((PULONG)0xCF8, CONFIG_CMD(Bus, Slot, Offset)); - WRITE_PORT_USHORT((PUSHORT)0xCFC + (Offset & 1), Value); + WRITE_PORT_USHORT((PUSHORT)0xCFC + (Offset & 2), Value); return STATUS_SUCCESS; case pbtType2: diff --git a/reactos/hal/halx86/pci.c b/reactos/hal/halx86/pci.c index 6ffb7980fe0..4ce16572252 100644 --- a/reactos/hal/halx86/pci.c +++ b/reactos/hal/halx86/pci.c @@ -1,4 +1,4 @@ -/* $Id: pci.c,v 1.8 2003/04/06 10:45:15 chorns Exp $ +/* $Id: pci.c,v 1.9 2003/04/26 07:06:54 hbirr Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -115,7 +115,7 @@ ReadPciConfigUshort(UCHAR Bus, case 1: KeAcquireSpinLock(&PciLock, &oldIrql); WRITE_PORT_ULONG((PULONG)0xCF8, CONFIG_CMD(Bus, Slot, Offset)); - *Value = READ_PORT_USHORT((PUSHORT)0xCFC + (Offset & 1)); + *Value = READ_PORT_USHORT((PUSHORT)0xCFC + (Offset & 2)); KeReleaseSpinLock(&PciLock, oldIrql); return STATUS_SUCCESS; @@ -215,7 +215,7 @@ WritePciConfigUshort(UCHAR Bus, case 1: KeAcquireSpinLock(&PciLock, &oldIrql); WRITE_PORT_ULONG((PULONG)0xCF8, CONFIG_CMD(Bus, Slot, Offset)); - WRITE_PORT_USHORT((PUSHORT)0xCFC + (Offset & 1), Value); + WRITE_PORT_USHORT((PUSHORT)0xCFC + (Offset & 2), Value); KeReleaseSpinLock(&PciLock, oldIrql); return STATUS_SUCCESS;