From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 04:26:44 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2622106566C; Thu, 8 Jan 2009 04:26:44 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B095A8FC0C; Thu, 8 Jan 2009 04:26:44 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n084QiSS008674; Thu, 8 Jan 2009 04:26:44 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n084QiEj008673; Thu, 8 Jan 2009 04:26:44 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200901080426.n084QiEj008673@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 8 Jan 2009 04:26:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186884 - head/sys/dev/fxp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 04:26:45 -0000 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;