mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-13 14:40:22 +00:00
In case a new mbuf can't be loaded, reuse the old one.
This commit is contained in:
parent
3f01dc2d9d
commit
f75e83846a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220693
@ -2108,6 +2108,18 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc,
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: bus_dmamap_load failed, error %d\n", __func__, error);
|
||||
m_freem(m1);
|
||||
|
||||
/* Try to reload the old mbuf. */
|
||||
error = bus_dmamap_load(ring->data_dmat, data->map,
|
||||
mtod(data->m, void *), IWN_RBUF_SIZE, iwn_dma_map_addr,
|
||||
&paddr, BUS_DMA_NOWAIT);
|
||||
if (error != 0 && error != EFBIG) {
|
||||
panic("%s: could not load old RX mbuf", __func__);
|
||||
}
|
||||
/* Physical address may have changed. */
|
||||
ring->desc[ring->cur] = htole32(paddr >> 8);
|
||||
bus_dmamap_sync(ring->data_dmat, ring->desc_dma.map,
|
||||
BUS_DMASYNC_PREWRITE);
|
||||
ifp->if_ierrors++;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user