Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jan 2009 04:26:44 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186884 - head/sys/dev/fxp
Message-ID:  <200901080426.n084QiEj008673@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901080426.n084QiEj008673>