diff options
author | David Hill <dhill@cvs.openbsd.org> | 2011-10-16 01:11:32 +0000 |
---|---|---|
committer | David Hill <dhill@cvs.openbsd.org> | 2011-10-16 01:11:32 +0000 |
commit | d8c22f78ca9c1ef8dfbe21a59d35e733ccee87f4 (patch) | |
tree | 33a307f2620b0b0c23097d8633452a012818cceb /sys/dev | |
parent | 942f1e02e56ae74e5c7b871d8e589778b3435d8f (diff) |
align the read to the PCI config space.
from drahn@, ok deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/agp_via.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/agpreg.h | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/pci/agp_via.c b/sys/dev/pci/agp_via.c index d2a49ba6feb..33fab817af4 100644 --- a/sys/dev/pci/agp_via.c +++ b/sys/dev/pci/agp_via.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_via.c,v 1.16 2010/08/07 19:31:23 oga Exp $ */ +/* $OpenBSD: agp_via.c,v 1.17 2011/10/16 01:11:31 dhill Exp $ */ /* $NetBSD: agp_via.c,v 1.2 2001/09/15 00:25:00 thorpej Exp $ */ /*- @@ -133,8 +133,9 @@ agp_via_attach(struct device *parent, struct device *self, void *aux) } if (AGP_CAPID_GET_MAJOR(capval) >= 3) { - agpsel = pci_conf_read(pa->pa_pc, pa->pa_tag, AGP_VIA_AGPSEL); - if ((agpsel & (1 << 1)) == 0) { + agpsel = pci_conf_read(pa->pa_pc, pa->pa_tag, + AGP_VIA_AGPSEL_REG); + if ((agpsel & (1 << 9)) == 0) { vsc->regs = via_v3_regs; printf(": v3"); } else { diff --git a/sys/dev/pci/agpreg.h b/sys/dev/pci/agpreg.h index d57fb7c7121..9efe42b4ab4 100644 --- a/sys/dev/pci/agpreg.h +++ b/sys/dev/pci/agpreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: agpreg.h,v 1.13 2011/09/14 10:26:16 oga Exp $ */ +/* $OpenBSD: agpreg.h,v 1.14 2011/10/16 01:11:31 dhill Exp $ */ /* $NetBSD: agpreg.h,v 1.1 2001/09/10 10:01:02 fvdl Exp $ */ /*- @@ -101,6 +101,7 @@ #define AGP3_VIA_GARTCTRL 0x90 #define AGP3_VIA_APSIZE 0x94 #define AGP3_VIA_ATTBASE 0x98 +#define AGP_VIA_AGPSEL_REG 0xfc #define AGP_VIA_AGPSEL 0xfd /* |