Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jan 2015 19:02:26 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r277890 - head/sys/dev/sfxge
Message-ID:  <201501291902.t0TJ2Q8l081663@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Thu Jan 29 19:02:25 2015
New Revision: 277890
URL: https://svnweb.freebsd.org/changeset/base/277890

Log:
  sfxge: Do not bzero() DMA allocated memory once again
  
  sfxge_dma_alloc() calls bus_dmamem_alloc() with BUS_DMA_ZERO flag, so
  allocated memory is already filled in by zeros
  
  Sponsored by:   Solarflare Communications, Inc.
  Approved by:    gnn (mentor)

Modified:
  head/sys/dev/sfxge/sfxge_port.c

Modified: head/sys/dev/sfxge/sfxge_port.c
==============================================================================
--- head/sys/dev/sfxge/sfxge_port.c	Thu Jan 29 19:01:09 2015	(r277889)
+++ head/sys/dev/sfxge/sfxge_port.c	Thu Jan 29 19:02:25 2015	(r277890)
@@ -583,7 +583,6 @@ sfxge_port_init(struct sfxge_softc *sc)
 					    M_SFXGE, M_WAITOK | M_ZERO);
 	if ((rc = sfxge_dma_alloc(sc, EFX_PHY_STATS_SIZE, phy_stats_buf)) != 0)
 		goto fail;
-	bzero(phy_stats_buf->esm_base, phy_stats_buf->esm_size);
 	sfxge_phy_stat_init(sc);
 
 	sysctl_ctx = device_get_sysctl_ctx(sc->dev);
@@ -605,7 +604,6 @@ sfxge_port_init(struct sfxge_softc *sc)
 					    M_SFXGE, M_WAITOK | M_ZERO);
 	if ((rc = sfxge_dma_alloc(sc, EFX_MAC_STATS_SIZE, mac_stats_buf)) != 0)
 		goto fail2;
-	bzero(mac_stats_buf->esm_base, mac_stats_buf->esm_size);
 	sfxge_mac_stat_init(sc);
 
 	port->init_state = SFXGE_PORT_INITIALIZED;



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