Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-0]: src/sys/dev/acpi/acpica/Osd Pullup rev 1.8 (requested by ko...



details:   https://anonhg.NetBSD.org/src/rev/e686776958c4
branches:  netbsd-2-0
changeset: 560574:e686776958c4
user:      jmc <jmc%NetBSD.org@localhost>
date:      Wed Apr 28 05:21:40 2004 +0000

description:
Pullup rev 1.8 (requested by kochi in ticket #189)

Fix 16bit-wide access to PCI configuration space.

diffstat:

 sys/dev/acpi/acpica/Osd/OsdHardware.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r 12a1e079f2ed -r e686776958c4 sys/dev/acpi/acpica/Osd/OsdHardware.c
--- a/sys/dev/acpi/acpica/Osd/OsdHardware.c     Wed Apr 28 05:20:42 2004 +0000
+++ b/sys/dev/acpi/acpica/Osd/OsdHardware.c     Wed Apr 28 05:21:40 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: OsdHardware.c,v 1.7 2004/03/23 19:00:03 drochner Exp $ */
+/*     $NetBSD: OsdHardware.c,v 1.7.2.1 2004/04/28 05:21:40 jmc Exp $  */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: OsdHardware.c,v 1.7 2004/03/23 19:00:03 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: OsdHardware.c,v 1.7.2.1 2004/04/28 05:21:40 jmc Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -216,7 +216,7 @@
                break;
 
        case 16:
-               *(uint16_t *) Value = (tmp >> ((Register & 1) * 8)) & 0xffff;
+               *(uint16_t *) Value = (tmp >> ((Register & 3) * 8)) & 0xffff;
                break;
 
        case 32:
@@ -255,9 +255,9 @@
                break;
 
        case 16:
-               tmp = pci_conf_read(acpi_softc->sc_pc, tag, Register & ~1);
-               tmp &= ~(0xffff << ((Register & 1) * 8));
-               tmp |= (Value << ((Register & 1) * 8));
+               tmp = pci_conf_read(acpi_softc->sc_pc, tag, Register & ~3);
+               tmp &= ~(0xffff << ((Register & 3) * 8));
+               tmp |= (Value << ((Register & 3) * 8));
                break;
 
        case 32:



Home | Main Index | Thread Index | Old Index