svn commit: r188379 - in stable/7/sys: . contrib/pf dev/cxgb dev/fxp

Pyun YongHyeon yongari at FreeBSD.org
Sun Feb 8 20:02:55 PST 2009


Author: yongari
Date: Mon Feb  9 04:02:53 2009
New Revision: 188379
URL: http://svn.freebsd.org/changeset/base/188379

Log:
  MFC r186884:
    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:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/fxp/if_fxp.c

Modified: stable/7/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/7/sys/dev/fxp/if_fxp.c	Mon Feb  9 04:00:54 2009	(r188378)
+++ stable/7/sys/dev/fxp/if_fxp.c	Mon Feb  9 04:02:53 2009	(r188379)
@@ -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-stable-7 mailing list