svn commit: r186884 - head/sys/dev/fxp
Pyun YongHyeon
yongari at FreeBSD.org
Wed Jan 7 20:26:45 PST 2009
Author: yongari
Date: Thu Jan 8 04:26:44 2009
New Revision: 186884
URL: http://svn.freebsd.org/changeset/base/186884
Log:
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.
Modified:
head/sys/dev/fxp/if_fxp.c
Modified: head/sys/dev/fxp/if_fxp.c
==============================================================================
--- head/sys/dev/fxp/if_fxp.c Thu Jan 8 02:41:40 2009 (r186883)
+++ head/sys/dev/fxp/if_fxp.c Thu Jan 8 04:26:44 2009 (r186884)
@@ -2545,7 +2545,8 @@ fxp_new_rfabuf(struct fxp_softc *sc, str
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;
More information about the svn-src-head
mailing list