From owner-svn-src-head@FreeBSD.ORG Thu Apr 8 19:13:42 2010 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 A3D10106566B; Thu, 8 Apr 2010 19:13:42 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 923E18FC08; Thu, 8 Apr 2010 19:13:42 +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 o38JDgs5008644; Thu, 8 Apr 2010 19:13:42 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o38JDgb5008642; Thu, 8 Apr 2010 19:13:42 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004081913.o38JDgb5008642@svn.freebsd.org> From: Jack F Vogel Date: Thu, 8 Apr 2010 19:13:42 +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: r206403 - head/sys/dev/e1000 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 Apr 2010 19:13:42 -0000 Author: jfv Date: Thu Apr 8 19:13:42 2010 New Revision: 206403 URL: http://svn.freebsd.org/changeset/base/206403 Log: Three changes: - add CRC stripping to the RX side, this was handled by some obscure code in rxeof previously, its easier to simply have the hardware strip it now. - Add back an ALTQ change that slipped between the cracks - Add an update to the watchdog_time in the xmit code, not doing this in ixgbe caused problems, think its needed here as well. Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu Apr 8 18:38:50 2010 (r206402) +++ head/sys/dev/e1000/if_em.c Thu Apr 8 19:13:42 2010 (r206403) @@ -93,7 +93,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.0.1"; +char em_driver_version[] = "7.0.2"; /********************************************************************* @@ -813,9 +813,13 @@ em_mq_start_locked(struct ifnet *ifp, st } enq = 0; - if (m == NULL) + if (m == NULL) { next = drbr_dequeue(ifp, txr->br); - else + } else if (drbr_needs_enqueue(ifp, txr->br)) { + if ((err = drbr_enqueue(ifp, txr->br, m)) != 0) + return (err); + next = drbr_dequeue(ifp, txr->br); + } else next = m; /* Process the queue */ @@ -1720,13 +1724,6 @@ em_xmit(struct tx_ring *txr, struct mbuf txd_upper = txd_lower = txd_used = txd_saved = 0; do_tso = ((m_head->m_pkthdr.csum_flags & CSUM_TSO) != 0); - /* - * Force a cleanup if number of TX descriptors - * available hits the threshold - */ - if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) - em_txeof(txr); - /* * TSO workaround: * If an mbuf is only header we need @@ -1915,6 +1912,11 @@ em_xmit(struct tx_ring *txr, struct mbuf bus_dmamap_sync(txr->txdma.dma_tag, txr->txdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); E1000_WRITE_REG(&adapter->hw, E1000_TDT(txr->me), i); + txr->watchdog_time = ticks; + + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) + em_txeof(txr); return (0); } @@ -3706,6 +3708,8 @@ em_refresh_mbufs(struct rx_ring *rxr, in rxr->next_to_refresh = i; } update: + bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); if (cleaned != -1) /* Update tail index */ E1000_WRITE_REG(&adapter->hw, E1000_RDT(rxr->me), cleaned); @@ -4040,6 +4044,9 @@ em_initialize_receive_unit(struct adapte E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF | (hw->mac.mc_filter_type << E1000_RCTL_MO_SHIFT); + /* Strip the CRC */ + rctl |= E1000_RCTL_SECRC; + /* Make sure VLAN Filters are off */ rctl &= ~E1000_RCTL_VFE; rctl &= ~E1000_RCTL_SBP;