summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>1998-11-11 00:50:32 +0000
committerJason Wright <jason@cvs.openbsd.org>1998-11-11 00:50:32 +0000
commit7869b0f4fce6dac4aff7c5fb604c08dd336f970b (patch)
tree64deccf860ac7793cc2cbec939911d8d2ac70463 /sys
parent777b7ad5376b715f1c9f137f1b1cf6d7345dc634 (diff)
A few more dma in non-dma slot checks
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/dev/dma.c26
-rw-r--r--sys/arch/sparc/dev/if_le.c9
-rw-r--r--sys/arch/sparc/dev/isp_sbus.c17
3 files changed, 38 insertions, 14 deletions
diff --git a/sys/arch/sparc/dev/dma.c b/sys/arch/sparc/dev/dma.c
index 8de7b726598..72e5499803e 100644
--- a/sys/arch/sparc/dev/dma.c
+++ b/sys/arch/sparc/dev/dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma.c,v 1.12 1998/07/05 09:24:25 deraadt Exp $ */
+/* $OpenBSD: dma.c,v 1.13 1998/11/11 00:50:31 jason Exp $ */
/* $NetBSD: dma.c,v 1.46 1997/08/27 11:24:16 bouyer Exp $ */
/*
@@ -64,6 +64,7 @@ void dmaattach __P((struct device *, struct device *, void *));
int dmamatch __P((struct device *, void *, void *));
void dma_reset __P((struct dma_softc *, int));
void espdma_reset __P((struct dma_softc *));
+int ledmamatch __P((struct device *, void *, void *));
void ledma_reset __P((struct dma_softc *));
void dma_enintr __P((struct dma_softc *));
int dma_isintr __P((struct dma_softc *));
@@ -82,7 +83,7 @@ struct cfdriver dma_cd = {
};
struct cfattach ledma_ca = {
- sizeof(struct dma_softc), matchbyname, dmaattach
+ sizeof(struct dma_softc), ledmamatch, dmaattach
};
struct cfdriver ledma_cd = {
@@ -114,8 +115,11 @@ dmamatch(parent, vcf, aux)
if (strcmp(cf->cf_driver->cd_name, ra->ra_name) &&
strcmp("espdma", ra->ra_name))
return (0);
- if (ca->ca_bustype == BUS_SBUS)
+ if (ca->ca_bustype == BUS_SBUS) {
+ if (!sbus_testdma((struct sbus_softc *)parent, ca))
+ return (0);
return (1);
+ }
ra->ra_len = NBPG;
return (probeget(ra->ra_vaddr, 4) != -1);
}
@@ -367,6 +371,22 @@ espdma_reset(sc)
dma_reset(sc, 0);
}
+int
+ledmamatch(parent, vcf, aux)
+ struct device *parent;
+ void *vcf, *aux;
+{
+ register struct cfdata *cf = vcf;
+ register struct confargs *ca = aux;
+ register struct romaux *ra = &ca->ca_ra;
+
+ if (strcmp(cf->cf_driver->cd_name, ra->ra_name))
+ return (0);
+ if (!sbus_testdma((struct sbus_softc *)parent, ca))
+ return(0);
+ return (1);
+}
+
void
ledma_reset(sc)
struct dma_softc *sc;
diff --git a/sys/arch/sparc/dev/if_le.c b/sys/arch/sparc/dev/if_le.c
index dfc9a7dcdb8..effa4c541a3 100644
--- a/sys/arch/sparc/dev/if_le.c
+++ b/sys/arch/sparc/dev/if_le.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le.c,v 1.12 1998/09/28 05:15:57 jason Exp $ */
+/* $OpenBSD: if_le.c,v 1.13 1998/11/11 00:50:31 jason Exp $ */
/* $NetBSD: if_le.c,v 1.50 1997/09/09 20:54:48 pk Exp $ */
/*-
@@ -186,7 +186,6 @@ lesetutp(sc)
if (lesc->sc_dma->sc_regs->csr & DE_AUI_TP)
return;
}
- printf("Setting utp: bit won't stick\n");
}
void
@@ -205,7 +204,6 @@ lesetaui(sc)
if ((lesc->sc_dma->sc_regs->csr & DE_AUI_TP) == 0)
return;
}
- printf("Setting aui: bit won't stick\n");
}
#endif
@@ -393,8 +391,11 @@ lematch(parent, vcf, aux)
if (strcmp(cf->cf_driver->cd_name, ra->ra_name))
return (0);
- if (ca->ca_bustype == BUS_SBUS)
+ if (ca->ca_bustype == BUS_SBUS) {
+ if (!sbus_testdma((struct sbus_softc *)parent, ca))
+ return (0);
return (1);
+ }
return (probeget(ra->ra_vaddr, 2) != -1);
}
diff --git a/sys/arch/sparc/dev/isp_sbus.c b/sys/arch/sparc/dev/isp_sbus.c
index a2d846f7b94..3fe4bfcf742 100644
--- a/sys/arch/sparc/dev/isp_sbus.c
+++ b/sys/arch/sparc/dev/isp_sbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp_sbus.c,v 1.2 1997/09/17 06:47:10 downsj Exp $ */
+/* $OpenBSD: isp_sbus.c,v 1.3 1998/11/11 00:50:31 jason Exp $ */
/* $NetBSD: isp_sbus.c,v 1.8 1997/08/27 11:24:19 bouyer Exp $ */
/*
@@ -105,15 +105,18 @@ isp_match(parent, vcf, aux)
struct confargs *ca = aux;
register struct romaux *ra = &ca->ca_ra;
- if (strcmp(cf->cf_driver->cd_name, ra->ra_name) &&
+ if (strcmp(cf->cf_driver->cd_name, ra->ra_name) &&
strcmp("SUNW,isp", ra->ra_name) &&
strcmp("QLGC,isp", ra->ra_name)) {
- return (0);
+ return (0);
+ }
+ if (ca->ca_bustype == BUS_SBUS) {
+ if (!sbus_testdma((struct sbus_softc *)parent, ca))
+ return (0);
+ return (1);
}
- if (ca->ca_bustype == BUS_SBUS)
- return (1);
- ra->ra_len = NBPG;
- return (probeget(ra->ra_vaddr, 1) != -1);
+ ra->ra_len = NBPG;
+ return (probeget(ra->ra_vaddr, 1) != -1);
}
static void