diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 2015-07-28 04:54:05 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2015-07-28 04:54:05 +0000 |
commit | f40c76d8dedcc7cf095b00787567a4f1d575280f (patch) | |
tree | 1520134136115919fdaa2f7579baa4f0a68823c3 /sys/dev/proto | |
parent | 033af09de113cdcba4b72685dd5311fffb1025c5 (diff) | |
download | src-f40c76d8dedcc7cf095b00787567a4f1d575280f.tar.gz src-f40c76d8dedcc7cf095b00787567a4f1d575280f.zip |
Check the sync operation.
Notes
Notes:
svn path=/head/; revision=285927
Diffstat (limited to 'sys/dev/proto')
-rw-r--r-- | sys/dev/proto/proto_busdma.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/proto/proto_busdma.c b/sys/dev/proto/proto_busdma.c index 52f1146ffdd0..6f6bf7b08916 100644 --- a/sys/dev/proto/proto_busdma.c +++ b/sys/dev/proto/proto_busdma.c @@ -325,7 +325,12 @@ static int proto_busdma_sync(struct proto_busdma *busdma, struct proto_md *md, struct proto_ioc_busdma *ioc) { - + u_int ops; + + ops = BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE | + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE; + if (ioc->u.sync.op & ~ops) + return (EINVAL); if (!md->physaddr) return (ENXIO); bus_dmamap_sync(md->bd_tag, md->bd_map, ioc->u.sync.op); |