summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-01-09 23:09:42 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-01-09 23:09:42 +0000
commitb2acda502157990a13e7fcf66be5bc8b96592861 (patch)
tree2821869624a851a5a1e1778ca7f147f5056ca915 /sys
parent15a0879d862e073979691839f0a8b5851f9a9983 (diff)
NCRDMA_SETUP() should be called before NCR_SET_COUNT() and NCRCMD_DMA command
in ncr53c9x_select(). From tsutsui NetBSD ok miod@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/ncr53c9x.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c
index 17f7ef8dbe7..6744be1db24 100644
--- a/sys/dev/ic/ncr53c9x.c
+++ b/sys/dev/ic/ncr53c9x.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr53c9x.c,v 1.27 2006/01/04 22:22:09 brad Exp $ */
+/* $OpenBSD: ncr53c9x.c,v 1.28 2006/01/09 23:09:41 brad Exp $ */
/* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */
/*
@@ -615,6 +615,8 @@ ncr53c9x_select(sc, ecb)
sc->sc_cmdlen = clen;
sc->sc_cmdp = (caddr_t)&ecb->cmd.cmd;
+ NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0,
+ &dmasize);
/* Program the SCSI counter */
NCR_SET_COUNT(sc, dmasize);
@@ -623,7 +625,6 @@ ncr53c9x_select(sc, ecb)
/* And get the targets attention */
NCRCMD(sc, NCRCMD_SELNATN | NCRCMD_DMA);
- NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &dmasize);
NCRDMA_GO(sc);
} else {
ncr53c9x_wrfifo(sc, (u_char *)&ecb->cmd.cmd, ecb->clen);
@@ -671,6 +672,7 @@ ncr53c9x_select(sc, ecb)
sc->sc_cmdlen = clen;
sc->sc_cmdp = cmd;
+ NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &dmasize);
/* Program the SCSI counter */
NCR_SET_COUNT(sc, dmasize);
@@ -685,7 +687,6 @@ ncr53c9x_select(sc, ecb)
NCRCMD(sc, NCRCMD_SELATN3 | NCRCMD_DMA);
} else
NCRCMD(sc, NCRCMD_SELATN | NCRCMD_DMA);
- NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &dmasize);
NCRDMA_GO(sc);
return;
}