From owner-svn-src-stable-7@FreeBSD.ORG Fri Sep 11 17:25:25 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1206F1065694; Fri, 11 Sep 2009 17:25:25 +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 00B9E8FC15; Fri, 11 Sep 2009 17:25:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8BHPOE8058645; Fri, 11 Sep 2009 17:25:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8BHPOQt058643; Fri, 11 Sep 2009 17:25:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200909111725.n8BHPOQt058643@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 11 Sep 2009 17:25:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197098 - in stable/7/sys: . contrib/pf dev/txp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2009 17:25:25 -0000 Author: yongari Date: Fri Sep 11 17:25:24 2009 New Revision: 197098 URL: http://svn.freebsd.org/changeset/base/197098 Log: MFC r196721: Make sure rx descriptor ring align on 16 bytes. I guess the alignment requirement could be multiple of 4 bytes but I think using descriptor size would make intention clearer. Previously the size of rx descriptor was not power of 2 so it caused panic in bus_dmamem_alloc(9). Reported by: Jeff Blank (jb000003 <> mr-happy dot com) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/txp/if_txp.c Modified: stable/7/sys/dev/txp/if_txp.c ============================================================================== --- stable/7/sys/dev/txp/if_txp.c Fri Sep 11 17:20:11 2009 (r197097) +++ stable/7/sys/dev/txp/if_txp.c Fri Sep 11 17:25:24 2009 (r197098) @@ -1389,7 +1389,8 @@ txp_alloc_rings(struct txp_softc *sc) /* High priority rx ring. */ error = txp_dma_alloc(sc, "hi priority rx ring", - &sc->sc_cdata.txp_rxhiring_tag, sizeof(struct txp_rx_desc), 0, + &sc->sc_cdata.txp_rxhiring_tag, + roundup(sizeof(struct txp_rx_desc), 16), 0, &sc->sc_cdata.txp_rxhiring_map, (void **)&sc->sc_ldata.txp_rxhiring, sizeof(struct txp_rx_desc) * RX_ENTRIES, &sc->sc_ldata.txp_rxhiring_paddr); @@ -1409,7 +1410,8 @@ txp_alloc_rings(struct txp_softc *sc) /* Low priority rx ring. */ error = txp_dma_alloc(sc, "low priority rx ring", - &sc->sc_cdata.txp_rxloring_tag, sizeof(struct txp_rx_desc), 0, + &sc->sc_cdata.txp_rxloring_tag, + roundup(sizeof(struct txp_rx_desc), 16), 0, &sc->sc_cdata.txp_rxloring_map, (void **)&sc->sc_ldata.txp_rxloring, sizeof(struct txp_rx_desc) * RX_ENTRIES, &sc->sc_ldata.txp_rxloring_paddr);