summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ubsec.c
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2000-07-29 23:42:01 +0000
committerJason Wright <jason@cvs.openbsd.org>2000-07-29 23:42:01 +0000
commit72b615ee4693fbf100d77fc0dda678dc352a1806 (patch)
treef6f882d87bb8d4bf86e13286eccf33ce9cc4f418 /sys/dev/pci/ubsec.c
parenteb2cd9b5c36dbba7b3fdba1e18d61132a9e1afcb (diff)
remove the (unused) sc_intrmask, and be more careful about initializing
the BS_CTRL register... The BE32 & BE64 bits do NOT do what they imply, so leave the bits set, and add the ones we want. This allows ubsec to interop with our software implementation (at least for encryption). More work to be done in this driver though... Many thanks to Jimmy Ruane at Broadcom for the pointer about BE32 & BE64!
Diffstat (limited to 'sys/dev/pci/ubsec.c')
-rw-r--r--sys/dev/pci/ubsec.c11
1 files changed, 5 insertions, 6 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);
}