mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Always check whether dma map is valid before unloading the map.
When fxp(4) intializes Rx buffers for the first time, there is no loaded dma map so attempting to unload it is an invalid operation.
This commit is contained in:
parent
8550170477
commit
e2157cf706
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186884
@ -2545,7 +2545,8 @@ fxp_new_rfabuf(struct fxp_softc *sc, struct fxp_rx *rxp)
|
||||
return (error);
|
||||
}
|
||||
|
||||
bus_dmamap_unload(sc->fxp_mtag, rxp->rx_map);
|
||||
if (rxp->rx_mbuf != NULL)
|
||||
bus_dmamap_unload(sc->fxp_mtag, rxp->rx_map);
|
||||
tmp_map = sc->spare_map;
|
||||
sc->spare_map = rxp->rx_map;
|
||||
rxp->rx_map = tmp_map;
|
||||
|
Loading…
Reference in New Issue
Block a user