diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-04-05 10:15:28 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-04-05 10:15:28 +0000 |
commit | fb23daef62b22dacb032aaa0ecaa61e15e4880d4 (patch) | |
tree | d3468986b38dd1dc22b6c0d1839f9eb4174ffcd7 /sys/dev/ic | |
parent | ed1eb8e657f8334195364360e9ededf5356b3f66 (diff) |
sili_post_direct lets you submit a prb without all the goop of a ccb and
xfer.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/sili.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sys/dev/ic/sili.c b/sys/dev/ic/sili.c index c1999590add..de928480f96 100644 --- a/sys/dev/ic/sili.c +++ b/sys/dev/ic/sili.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sili.c,v 1.9 2007/04/05 10:02:07 dlg Exp $ */ +/* $OpenBSD: sili.c,v 1.10 2007/04/05 10:15:27 dlg Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -63,6 +63,8 @@ int sili_pwait_eq(struct sili_port *, bus_size_t, u_int32_t, u_int32_t, int); int sili_pwait_ne(struct sili_port *, bus_size_t, u_int32_t, u_int32_t, int); +void sili_post_direct(struct sili_port *, u_int, + void *, size_t buflen); /* atascsi interface */ int sili_ata_probe(void *, int); @@ -229,6 +231,24 @@ sili_pwait_ne(struct sili_port *sp, bus_size_t r, u_int32_t mask, return (1); } +void +sili_post_direct(struct sili_port *sp, u_int slot, void *buf, size_t buflen) +{ + bus_size_t r = SILI_PREG_SLOT(slot); + +#ifdef DIAGNOSTIC + if (buflen != 64 && buflen != 128) + panic("sili_pcopy: buflen of %d is not 64 or 128", buflen); +#endif + + bus_space_write_raw_region_4(sp->sp_sc->sc_iot_port, sp->sp_ioh, r, + buf, buflen); + bus_space_barrier(sp->sp_sc->sc_iot_port, sp->sp_ioh, r, buflen, + BUS_SPACE_BARRIER_WRITE); + + sili_pwrite(sp, SILI_PREG_FIFO, slot); +} + int sili_ata_probe(void *xsc, int port) { |