Fix transfers that don't use busdma or bounce buffer (e.g. software dmas).
Busdma data loaded by different function (the bug introduced in r349727). Sponsored by: DARPA, AFRL
This commit is contained in:
parent
af6e9d0f2e
commit
b78d15fb37
@ -493,14 +493,13 @@ _xdma_load_data(xdma_channel_t *xchan, struct xdma_request *xr,
|
||||
|
||||
switch (xr->req_type) {
|
||||
case XR_TYPE_MBUF:
|
||||
if (xchan->caps & XCHAN_CAP_BUSDMA)
|
||||
seg[0].ds_addr = mtod(m, bus_addr_t);
|
||||
else if (xchan->caps & XCHAN_CAP_BOUNCE) {
|
||||
if (xchan->caps & XCHAN_CAP_BOUNCE) {
|
||||
if (xr->direction == XDMA_MEM_TO_DEV)
|
||||
m_copydata(m, 0, m->m_pkthdr.len,
|
||||
(void *)xr->buf.vaddr);
|
||||
seg[0].ds_addr = (bus_addr_t)xr->buf.paddr;
|
||||
}
|
||||
} else
|
||||
seg[0].ds_addr = mtod(m, bus_addr_t);
|
||||
seg[0].ds_len = m->m_pkthdr.len;
|
||||
break;
|
||||
case XR_TYPE_BIO:
|
||||
|
Loading…
x
Reference in New Issue
Block a user