diff options
author | marius <marius@FreeBSD.org> | 2013-06-01 11:42:47 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2013-06-01 11:42:47 +0000 |
commit | e27884bd80ff4028189c02791e2a01f3513fcdb2 (patch) | |
tree | 8f1e80c219b9e0de143e2d72ae43b2b55e610a13 /sys/kern | |
parent | 94bc7b88c2c1ca6e3544e9d8c044debab63175af (diff) | |
download | FreeBSD-src-e27884bd80ff4028189c02791e2a01f3513fcdb2.zip FreeBSD-src-e27884bd80ff4028189c02791e2a01f3513fcdb2.tar.gz |
Move an assertion to the right spot; only bus_dmamap_load_mbuf(9)
requires a pkthdr being present but that's not the case for either
_bus_dmamap_load_mbuf_sg() or bus_dmamap_load_mbuf_sg(9).
Reported by: sbruno
MFC after: 1 week
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/subr_bus_dma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_bus_dma.c b/sys/kern/subr_bus_dma.c index 98b801f..999de3f 100644 --- a/sys/kern/subr_bus_dma.c +++ b/sys/kern/subr_bus_dma.c @@ -104,8 +104,6 @@ _bus_dmamap_load_mbuf_sg(bus_dma_tag_t dmat, bus_dmamap_t map, struct mbuf *m; int error; - M_ASSERTPKTHDR(m0); - error = 0; for (m = m0; m != NULL && error == 0; m = m->m_next) { if (m->m_len > 0) { @@ -323,6 +321,8 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat, bus_dmamap_t map, struct mbuf *m0, bus_dma_segment_t *segs; int nsegs, error; + M_ASSERTPKTHDR(m0); + flags |= BUS_DMA_NOWAIT; nsegs = -1; error = _bus_dmamap_load_mbuf_sg(dmat, map, m0, NULL, &nsegs, flags); |