mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Check the sync operation.
This commit is contained in:
parent
033af09de1
commit
f40c76d8de
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=285927
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user