Lines 2272-2278
Link Here
|
2272 |
} |
2272 |
} |
2273 |
if (error != 0) { |
2273 |
if (error != 0) { |
2274 |
/* Too many DMA segments, linearize mbuf. */ |
2274 |
/* Too many DMA segments, linearize mbuf. */ |
2275 |
m1 = m_collapse(buf->m, M_NOWAIT, WPI_MAX_SCATTER); |
2275 |
m1 = m_collapse(buf->m, M_NOWAIT, WPI_MAX_SCATTER - 1); |
2276 |
if (m1 == NULL) { |
2276 |
if (m1 == NULL) { |
2277 |
device_printf(sc->sc_dev, |
2277 |
device_printf(sc->sc_dev, |
2278 |
"%s: could not defrag mbuf\n", __func__); |
2278 |
"%s: could not defrag mbuf\n", __func__); |
Lines 2291-2296
Link Here
|
2291 |
} |
2291 |
} |
2292 |
} |
2292 |
} |
2293 |
|
2293 |
|
|
|
2294 |
KASSERT(nsegs < WPI_MAX_SCATTER, |
2295 |
("too many DMA segments, nsegs (%d) should be less than %d", |
2296 |
nsegs, WPI_MAX_SCATTER)); |
2297 |
|
2294 |
data->m = buf->m; |
2298 |
data->m = buf->m; |
2295 |
data->ni = buf->ni; |
2299 |
data->ni = buf->ni; |
2296 |
|
2300 |
|