diff --git a/sys/dev/ic/dpt.c b/sys/dev/ic/dpt.c index 9553d1ab5f48..f99d23afa434 100644 --- a/sys/dev/ic/dpt.c +++ b/sys/dev/ic/dpt.c @@ -1,4 +1,4 @@ -/* $NetBSD: dpt.c,v 1.26 2001/03/07 23:07:15 thorpej Exp $ */ +/* $NetBSD: dpt.c,v 1.27 2001/03/10 13:30:55 briggs Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.26 2001/03/07 23:07:15 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.27 2001/03/10 13:30:55 briggs Exp $"); #include #include @@ -387,7 +387,10 @@ dpt_cmd(sc, cp, addr, eatacmd, icmd) if (cp == NULL) addr = 0; - dpt_outl(sc, HA_DMA_BASE, (u_int32_t)addr); + dpt_outb(sc, HA_DMA_BASE+0, (addr ) & 0xff); + dpt_outb(sc, HA_DMA_BASE+1, (addr>>8 ) & 0xff); + dpt_outb(sc, HA_DMA_BASE+2, (addr>>16) & 0xff); + dpt_outb(sc, HA_DMA_BASE+3, (addr>>24) & 0xff); if (eatacmd == CP_IMMEDIATE) { if (cp == NULL) { @@ -516,7 +519,7 @@ dpt_readcfg(sc) /* Begin reading */ while (i--) - *p++ = dpt_inw(sc, HA_DATA); + *p++ = bus_space_read_stream_2(sc->sc_iot, sc->sc_ioh, HA_DATA); if ((i = ec->ec_cfglen) > (sizeof(struct eata_cfg) - (int)(&(((struct eata_cfg *)0L)->ec_cfglen)) @@ -530,12 +533,12 @@ dpt_readcfg(sc) i >>= 1; while (i--) - *p++ = dpt_inw(sc, HA_DATA); + *p++ = bus_space_read_stream_2(sc->sc_iot, sc->sc_ioh, HA_DATA); /* Flush until we have read 512 bytes. */ i = (512 - j + 1) >> 1; while (i--) - dpt_inw(sc, HA_DATA); + dpt_inw(sc, HA_DATA); /* Defaults for older Firmware */ if (p <= (u_short *)&ec->ec_hba[DPT_MAX_CHANNELS - 1])