summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2004-04-12 06:56:43 +0000
committerBrad Smith <brad@cvs.openbsd.org>2004-04-12 06:56:43 +0000
commit7a7e629be2d7b369449460d6d3b60a922de2c73d (patch)
treefed160428c85451d48f22a42ec1a69ded4181ea8 /sys/dev/pci
parent9008d0ed8daa15a3e41e00ab569907889962aa20 (diff)
Enable the memory arbiter before turning off the PXE restart. This
prevents NMI's from happening when resetting the chip on some hardware. From: FreeBSD ok deraadt@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_bge.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index e77eabc935e..fec67d533f5 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.24 2004/04/09 21:52:16 henning Exp $ */
+/* $OpenBSD: if_bge.c,v 1.25 2004/04/12 06:56:42 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2001
@@ -1085,10 +1085,7 @@ bge_chipinit(sc)
#else
CSR_WRITE_4(sc, BGE_MODE_CTL, BGE_MODECTL_WORDSWAP_NONFRAME|
BGE_MODECTL_BYTESWAP_DATA|BGE_MODECTL_WORDSWAP_DATA|
- BGE_MODECTL_MAC_ATTN_INTR|BGE_MODECTL_HOST_SEND_BDS
-/* |BGE_MODECTL_TX_NO_PHDR_CSUM| */
-/* BGE_MODECTL_RX_NO_PHDR_CSUM */
-);
+ BGE_MODECTL_MAC_ATTN_INTR|BGE_MODECTL_HOST_SEND_BDS);
#endif
/*
@@ -1863,6 +1860,10 @@ bge_reset(sc)
pci_conf_write(pa->pa_pc, pa->pa_tag, BGE_PCI_CMD, command);
bge_writereg_ind(sc, BGE_MISC_CFG, (65 << 1));
+ /* Enable memory arbiter. */
+ if (sc->bge_asicrev != BGE_ASICREV_BCM5705)
+ CSR_WRITE_4(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE);
+
/*
* Prevent PXE restart: write a magic number to the
* general communications memory at 0xB50.
@@ -1902,10 +1903,6 @@ bge_reset(sc)
DELAY(10);
}
- /* Enable memory arbiter. */
- if (sc->bge_asicrev != BGE_ASICREV_BCM5705)
- CSR_WRITE_4(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE);
-
/* Fix up byte swapping */
CSR_WRITE_4(sc, BGE_MODE_CTL, BGE_MODECTL_BYTESWAP_NONFRAME|
BGE_MODECTL_BYTESWAP_DATA);