Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Feb 2009 04:02:53 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r188379 - in stable/7/sys: . contrib/pf dev/cxgb dev/fxp
Message-ID:  <200902090402.n1942r56044867@svn.freebsd.org>

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



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