svn commit: r277890 - head/sys/dev/sfxge
Andrew Rybchenko
arybchik at FreeBSD.org
Thu Jan 29 19:02:26 UTC 2015
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;
More information about the svn-src-all
mailing list