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:
Ruslan Bukin 2019-07-04 15:26:02 +00:00
parent fbcd71879b
commit 17f1623d42
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349732

View File

@ -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: