Author: arybchik
Date: Wed Mar 25 10:18:23 2015
New Revision: 280514
URL: https://svnweb.freebsd.org/changeset/base/280514

Log:
  MFC: 277890
  
  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:
  stable/10/sys/dev/sfxge/sfxge_port.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/sfxge_port.c
==============================================================================
--- stable/10/sys/dev/sfxge/sfxge_port.c        Wed Mar 25 10:17:24 2015        
(r280513)
+++ stable/10/sys/dev/sfxge/sfxge_port.c        Wed Mar 25 10:18:23 2015        
(r280514)
@@ -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;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to