summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/pccbb.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c
index 96f4e0acda5..12ad13b69fb 100644
--- a/sys/dev/pci/pccbb.c
+++ b/sys/dev/pci/pccbb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccbb.c,v 1.24 2001/08/19 15:25:44 mickey Exp $ */
+/* $OpenBSD: pccbb.c,v 1.25 2001/08/22 16:33:11 aaron Exp $ */
/* $NetBSD: pccbb.c,v 1.42 2000/06/16 23:41:35 cgd Exp $ */
/*
@@ -3020,10 +3020,9 @@ pccbb_winset(align, sc, bst)
struct pccbb_win_chain *chainp;
int offs;
- win[0].win_start = 0xffffffff;
- win[0].win_limit = 0;
- win[1].win_start = 0xffffffff;
- win[1].win_limit = 0;
+ win[0].win_start = win[1].win_start = 0xffffffff;
+ win[0].win_limit = win[1].win_limit = 0;
+ win[0].win_flags = win[1].win_flags = 0;
chainp = TAILQ_FIRST(&sc->sc_iowindow);
offs = 0x2c;
@@ -3117,16 +3116,14 @@ pccbb_winset(align, sc, bst)
pci_conf_read(pc, tag, offs + 12) + align));
if (bst == sc->sc_memt) {
- if (win[0].win_flags & PCCBB_MEM_CACHABLE) {
- pcireg_t bcr = pci_conf_read(pc, tag, PCI_BCR_INTR);
+ pcireg_t bcr = pci_conf_read(pc, tag, PCI_BCR_INTR);
+
+ bcr &= ~(CB_BCR_PREFETCH_MEMWIN0 | CB_BCR_PREFETCH_MEMWIN1);
+ if (win[0].win_flags & PCCBB_MEM_CACHABLE)
bcr |= CB_BCR_PREFETCH_MEMWIN0;
- pci_conf_write(pc, tag, PCI_BCR_INTR, bcr);
- }
- if (win[1].win_flags & PCCBB_MEM_CACHABLE) {
- pcireg_t bcr = pci_conf_read(pc, tag, PCI_BCR_INTR);
+ if (win[1].win_flags & PCCBB_MEM_CACHABLE)
bcr |= CB_BCR_PREFETCH_MEMWIN1;
- pci_conf_write(pc, tag, PCI_BCR_INTR, bcr);
- }
+ pci_conf_write(pc, tag, PCI_BCR_INTR, bcr);
}
}