diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-03-28 19:08:24 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-03-28 19:08:24 +0000 |
commit | ac18346bf6ac81a9f0d0a9becbb79bcb309fb7ab (patch) | |
tree | dffcd49eb5ddd39aa15f27f1d4c3baa4feef2d11 /sys/arch/sparc/dev | |
parent | 20924c77b7da29d9d25239fb472a956d315cd0e4 (diff) |
When attaching an sbus esp(4), do the sbus_testdma() check regardless of the
actual card name we're attaching.
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r-- | sys/arch/sparc/dev/esp.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/arch/sparc/dev/esp.c b/sys/arch/sparc/dev/esp.c index 112f696c10c..faa1c504665 100644 --- a/sys/arch/sparc/dev/esp.c +++ b/sys/arch/sparc/dev/esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esp.c,v 1.34 2014/01/21 03:42:21 dlg Exp $ */ +/* $OpenBSD: esp.c,v 1.35 2015/03/28 19:08:23 miod Exp $ */ /* $NetBSD: esp.c,v 1.69 1997/08/27 11:24:18 bouyer Exp $ */ /* @@ -114,8 +114,8 @@ #include <uvm/uvm_extern.h> -#include <machine/cpu.h> #include <machine/autoconf.h> +#include <machine/cpu.h> #include <dev/ic/ncr53c9xreg.h> #include <dev/ic/ncr53c9xvar.h> @@ -182,12 +182,15 @@ espmatch(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; + struct cfdata *cf = vcf; + struct confargs *ca = aux; + struct romaux *ra = &ca->ca_ra; #if defined(SUN4C) || defined(SUN4D) || defined(SUN4E) || defined(SUN4M) if (ca->ca_bustype == BUS_SBUS) { + if (!sbus_testdma((struct sbus_softc *)parent, ca)) + return (0); + if (strcmp("SUNW,fas", ra->ra_name) == 0 || strcmp("ptscII", ra->ra_name) == 0) return (1); @@ -196,12 +199,10 @@ espmatch(parent, vcf, aux) if (strcmp(cf->cf_driver->cd_name, ra->ra_name)) return (0); + #if defined(SUN4C) || defined(SUN4D) || defined(SUN4E) || defined(SUN4M) - if (ca->ca_bustype == BUS_SBUS) { - if (!sbus_testdma((struct sbus_softc *)parent, ca)) - return (0); + if (ca->ca_bustype == BUS_SBUS) return (1); - } #endif #ifdef SUN4 if (cpuinfo.cpu_type == CPUTYP_4_100) |