summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/ubsec.c11
-rw-r--r--sys/dev/pci/ubsecvar.h3
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c
index 284f873fc42..69f4603890b 100644
--- a/sys/dev/pci/ubsec.c
+++ b/sys/dev/pci/ubsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsec.c,v 1.17 2000/07/20 21:45:19 deraadt Exp $ */
+/* $OpenBSD: ubsec.c,v 1.18 2000/07/29 23:42:00 jason Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -131,15 +131,12 @@ ubsec_attach(parent, self, aux)
SIMPLEQ_INIT(&sc->sc_queue);
SIMPLEQ_INIT(&sc->sc_qchip);
- sc->sc_intrmask = BS_CTRL_MCR1INT | BS_CTRL_DMAERR;
if ((PCI_VENDOR(pa->pa_id) == PCI_VENDOR_BLUESTEEL &&
PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BLUESTEEL_5601) ||
(PCI_VENDOR(pa->pa_id) == PCI_VENDOR_BROADCOM &&
- PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_5805)) {
- sc->sc_intrmask |= BS_CTRL_MCR2INT;
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_5805))
sc->sc_5601 = 1;
- }
cmd = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
cmd |= PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE;
@@ -189,7 +186,9 @@ ubsec_attach(parent, self, aux)
crypto_register(sc->sc_cid, CRYPTO_MD5_HMAC96, NULL, NULL, NULL);
crypto_register(sc->sc_cid, CRYPTO_SHA1_HMAC96, NULL, NULL, NULL);
- WRITE_REG(sc, BS_CTRL, BS_CTRL_MCR1INT | BS_CTRL_DMAERR);
+ WRITE_REG(sc, BS_CTRL,
+ READ_REG(sc, BS_CTRL) | BS_CTRL_MCR1INT | BS_CTRL_DMAERR |
+ (sc->sc_5601 ? BS_CTRL_MCR2INT : 0));
printf(": %s\n", intrstr);
}
diff --git a/sys/dev/pci/ubsecvar.h b/sys/dev/pci/ubsecvar.h
index 090b7e4838f..6bc5ff44fac 100644
--- a/sys/dev/pci/ubsecvar.h
+++ b/sys/dev/pci/ubsecvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsecvar.h,v 1.5 2000/06/19 02:51:29 jason Exp $ */
+/* $OpenBSD: ubsecvar.h,v 1.6 2000/07/29 23:42:00 jason Exp $ */
/*
* Copyright (c) 2000 Theo de Raadt
@@ -35,7 +35,6 @@ struct ubsec_softc {
bus_dma_tag_t sc_dmat; /* dma tag */
int sc_5601; /* device is 5601 */
int32_t sc_cid; /* crypto tag */
- u_int32_t sc_intrmask; /* interrupt mask */
SIMPLEQ_HEAD(,ubsec_q) sc_queue; /* packet queue */
int sc_nqueue; /* count enqueued */
SIMPLEQ_HEAD(,ubsec_q) sc_qchip; /* on chip */