diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-12-14 11:39:31 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-12-14 11:39:31 +0000 |
commit | c45a2e07da81e0e50521513be10ce2e67051390a (patch) | |
tree | 43fa356503e10acf9984803e70a9453ffcd00238 | |
parent | e1bd79187f2a8ed916a5c2f004abdf8a80dd8424 (diff) |
Various typos and minor cleanup
-rw-r--r-- | sys/dev/pv/xbf.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index 50f1c11c5e2..9eee49e52bb 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.11 2016/12/13 19:02:39 mikeb Exp $ */ +/* $OpenBSD: xbf.c,v 1.12 2016/12/14 11:39:30 mikeb Exp $ */ /* * Copyright (c) 2016 Mike Belopuhov @@ -56,7 +56,7 @@ #define XBF_OK 0 #define XBF_EIO -1 /* generic failure */ -#define XBF_EOPNOTSUPP -2 /* only for XBF_OP_WRBAR */ +#define XBF_EOPNOTSUPP -2 /* only for XBF_OP_BARRIER */ struct xbf_sge { uint32_t sge_ref; @@ -328,8 +328,6 @@ xbf_io_get(void *xsc) if (sc->sc_state != XBF_CONNECTED) rv = NULL; - else - KASSERT(atomic_dec_int_nv(&sc->sc_xs_avail) >= 0); return (rv); } @@ -341,10 +339,8 @@ xbf_io_put(void *xsc, void *io) #ifdef DIAGNOSTIC if (sc != io) - panic("vsdk_io_put: unexpected io"); + panic("xbf_io_put: unexpected io"); #endif - - KASSERT(atomic_inc_int_nv(&sc->sc_xs_avail) <= sc->sc_xr_ndesc); } void @@ -670,7 +666,7 @@ xbf_complete_cmd(struct scsi_xfer *xs, int desc) bus_dmamap_sync(sc->sc_dmat, sc->sc_xr_dma.dma_map, 0, sc->sc_xr_dma.dma_map->dm_mapsize, BUS_DMASYNC_POSTREAD | - BUS_DMASYNC_POSTREAD); + BUS_DMASYNC_POSTWRITE); xrd = &sc->sc_xr->xr_desc[desc]; error = xrd->xrd_rsp.rsp_status == XBF_OK ? XS_NOERROR : |