summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-11-20 20:19:27 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-11-20 20:19:27 +0000
commit8ee75625dd5a8485d5609d0d03f70482b9c0c97e (patch)
tree6ada884796e3da0045d92390e31d0ad3376cc699 /sys/dev/pci
parente6c771e908bf6bd85a0b02f96442a8166a8c2cc0 (diff)
Match bcom 5821 (this is untested and is based on the datasheet's claim that
the 5821 is "register and software compatible with Broadcom 5820").
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/ubsec.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c
index 0f44e0469fa..71231bd174b 100644
--- a/sys/dev/pci/ubsec.c
+++ b/sys/dev/pci/ubsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsec.c,v 1.74 2001/11/14 00:39:46 jason Exp $ */
+/* $OpenBSD: ubsec.c,v 1.75 2001/11/20 20:19:26 jason Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -113,7 +113,8 @@ ubsec_probe(parent, match, aux)
return (1);
if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_BROADCOM &&
(PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_5805 ||
- PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_5820))
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_5820 ||
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_5821))
return (1);
return (0);
}
@@ -145,7 +146,8 @@ ubsec_attach(parent, self, aux)
sc->sc_flags |= UBS_FLAGS_KEY;
if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_BROADCOM &&
- PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_5820)
+ (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_5820 ||
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_5821))
sc->sc_flags |= UBS_FLAGS_KEY | UBS_FLAGS_LONGCTX;
cmd = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
@@ -170,6 +172,11 @@ ubsec_attach(parent, self, aux)
}
sc->sc_dmat = pa->pa_dmat;
+ /* Disable TRDY timeout and RETRY timeout */
+ cmd = pci_conf_read(pc, pa->pa_tag, BS_TRDY_TIMEOUT);
+ cmd &= 0xffff0000;
+ pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, cmd);
+
if (pci_intr_map(pa, &ih)) {
printf(": couldn't map interrupt\n");
bus_space_unmap(sc->sc_st, sc->sc_sh, iosize);