summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-05-11 15:01:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-05-11 15:01:16 +0000
commit9e62115e3d59c104360166fdda9f72bc3b8c5e63 (patch)
treeee7507c66a02fe9182100b80ea7ac2f9e2c12df6 /sys
parente437b8bccf6e9a388c53a9133195c8b2e9794592 (diff)
I think this will match and work on a hifn 7951
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/hifn7751.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/dev/pci/hifn7751.c b/sys/dev/pci/hifn7751.c
index 17bfbd38505..9ece43a4fbb 100644
--- a/sys/dev/pci/hifn7751.c
+++ b/sys/dev/pci/hifn7751.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hifn7751.c,v 1.58 2001/05/08 20:41:00 deraadt Exp $ */
+/* $OpenBSD: hifn7751.c,v 1.59 2001/05/11 15:01:15 deraadt Exp $ */
/*
* Invertex AEON / Hi/fn 7751 driver
@@ -120,6 +120,9 @@ hifn_probe(parent, match, aux)
if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_HIFN &&
PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_HIFN_7751)
return (1);
+ if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_HIFN &&
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_HIFN_7951)
+ return (1);
if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_NETSEC &&
PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_NETSEC_7751)
return (1);
@@ -210,6 +213,10 @@ hifn_attach(parent, self, aux)
goto fail_mem;
}
+ if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_HIFN &&
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_HIFN_7951)
+ sc->sc_flags = HIFN_HAS_RNG | HIFN_HAS_PUBLIC;
+
hifn_init_dma(sc);
hifn_init_pci_registers(sc);
@@ -376,6 +383,11 @@ struct pci2id {
char card_id[13];
} pci2id[] = {
{
+ PCI_VENDOR_HIFN,
+ PCI_PRODUCT_HIFN_7951,
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00 }
+ }, {
PCI_VENDOR_NETSEC,
PCI_PRODUCT_NETSEC_7751,
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -445,9 +457,7 @@ hifn_enable_crypto(sc, pciid)
#ifdef HIFN_DEBUG
printf(": Strong Crypto already enabled!\n");
#endif
- WRITE_REG_0(sc, HIFN_0_PUCNFG, ramcfg);
- WRITE_REG_1(sc, HIFN_1_DMA_CNFG, dmacfg);
- return 0; /* success */
+ goto report;
}
if (encl != 0 && encl != HIFN_PUSTAT_ENA_0) {
@@ -482,6 +492,7 @@ hifn_enable_crypto(sc, pciid)
printf(": engine enabled successfully!");
#endif
+report:
WRITE_REG_0(sc, HIFN_0_PUCNFG, ramcfg);
WRITE_REG_1(sc, HIFN_1_DMA_CNFG, dmacfg);