From fb23daef62b22dacb032aaa0ecaa61e15e4880d4 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Thu, 5 Apr 2007 10:15:28 +0000 Subject: sili_post_direct lets you submit a prb without all the goop of a ccb and xfer. --- sys/dev/ic/sili.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'sys/dev/ic') 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 @@ -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) { -- cgit v1.2.3