Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci If the cache line size in the BHLC register is n...



details:   https://anonhg.NetBSD.org/src/rev/5993ca30b9e3
branches:  trunk
changeset: 510205:5993ca30b9e3
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue May 22 16:10:44 2001 +0000

description:
If the cache line size in the BHLC register is not configured,
then clear the MRL/MRM/MWI command-ok flags when attaching a
device.

diffstat:

 sys/dev/pci/pci.c |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 7f394bb2f3b9 -r 5993ca30b9e3 sys/dev/pci/pci.c
--- a/sys/dev/pci/pci.c Tue May 22 16:07:56 2001 +0000
+++ b/sys/dev/pci/pci.c Tue May 22 16:10:44 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci.c,v 1.52 2001/05/04 15:20:12 bouyer Exp $  */
+/*     $NetBSD: pci.c,v 1.53 2001/05/22 16:10:44 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995, 1996, 1997, 1998
@@ -197,6 +197,7 @@
                        csr = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG);
                        class = pci_conf_read(pc, tag, PCI_CLASS_REG);
                        intr = pci_conf_read(pc, tag, PCI_INTERRUPT_REG);
+                       bhlcr = pci_conf_read(pc, tag, PCI_BHLC_REG);
 
                        /* Invalid vendor ID value? */
                        if (PCI_VENDOR(id) == PCI_VENDOR_INVALID)
@@ -226,6 +227,14 @@
                        if ((csr & PCI_COMMAND_MEM_ENABLE) == 0)
                                pa.pa_flags &= ~PCI_FLAGS_MEM_ENABLED;
 
+                       /*
+                        * If the cache line size is not configured, then
+                        * clear the MRL/MRM/MWI command-ok flags.
+                        */
+                       if (PCI_CACHELINE(bhlcr) == 0)
+                               pa.pa_flags &= ~(PCI_FLAGS_MRL_OKAY|
+                                   PCI_FLAGS_MRM_OKAY|PCI_FLAGS_MWI_OKAY);
+
                        if (bus == 0) {
                                pa.pa_intrswiz = 0;
                                pa.pa_intrtag = tag;



Home | Main Index | Thread Index | Old Index