From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 21:47:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3268E1065694; Thu, 19 Nov 2009 21:47:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06EFB8FC1D; Thu, 19 Nov 2009 21:47:55 +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 nAJLlsSb020595; Thu, 19 Nov 2009 21:47:54 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJLlsll020593; Thu, 19 Nov 2009 21:47:54 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911192147.nAJLlsll020593@svn.freebsd.org> From: John Baldwin Date: Thu, 19 Nov 2009 21:47:54 +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: r199554 - head/sys/dev/nxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 21:47:55 -0000 Author: jhb Date: Thu Nov 19 21:47:54 2009 New Revision: 199554 URL: http://svn.freebsd.org/changeset/base/199554 Log: Fix compile after previous "harmless" commit. Pointy hat to: jhb Modified: head/sys/dev/nxge/if_nxge.c Modified: head/sys/dev/nxge/if_nxge.c ============================================================================== --- head/sys/dev/nxge/if_nxge.c Thu Nov 19 21:46:58 2009 (r199553) +++ head/sys/dev/nxge/if_nxge.c Thu Nov 19 21:47:54 2009 (r199554) @@ -2943,7 +2943,6 @@ xge_flush_txds(xge_hal_channel_h channel xge_lldev_t *lldev = xge_hal_channel_userdata(channelh); xge_hal_dtr_h tx_dtr; xge_tx_priv_t *tx_priv; - struct ifnet *ifnetp = lldev->ifnetp; u8 t_code; while(xge_hal_fifo_dtr_next_completed(channelh, &tx_dtr, &t_code) @@ -3005,7 +3004,7 @@ xge_send_locked(struct ifnet *ifnetp, in /* If device is not initialized, return */ if((!lldev->initialized) || (!(ifnetp->if_drv_flags & IFF_DRV_RUNNING))) - goto _exit; + return; XGE_DRV_STATS(tx_calls); @@ -3015,7 +3014,10 @@ xge_send_locked(struct ifnet *ifnetp, in */ for(;;) { IF_DEQUEUE(&ifnetp->if_snd, m_head); - if(m_head == NULL) break; + if (m_head == NULL) { + ifnetp->if_drv_flags &= ~(IFF_DRV_OACTIVE); + return; + } for(m_buf = m_head; m_buf != NULL; m_buf = m_buf->m_next) { if(m_buf->m_len) count += 1; @@ -3032,7 +3034,7 @@ xge_send_locked(struct ifnet *ifnetp, in if(status != XGE_HAL_OK) { XGE_DRV_STATS(tx_no_txd); xge_flush_txds(channelh); - goto _exit1; + break; } vlan_tag = @@ -3053,7 +3055,7 @@ xge_send_locked(struct ifnet *ifnetp, in ll_tx_priv->dma_map, m_head, segs, &nsegs, BUS_DMA_NOWAIT)) { xge_trace(XGE_TRACE, "DMA map load failed"); XGE_DRV_STATS(tx_map_fail); - goto _exit1; + break; } if(lldev->driver_stats.tx_max_frags < nsegs) @@ -3092,9 +3094,7 @@ xge_send_locked(struct ifnet *ifnetp, in * listener so that we can use tools like tcpdump */ ETHER_BPF_MTAP(ifnetp, m_head); } - ifnetp->if_drv_flags &= ~(IFF_DRV_OACTIVE); - goto _exit; -_exit1: + /* Prepend the packet back to queue */ IF_PREPEND(&ifnetp->if_snd, m_head); ifnetp->if_drv_flags |= IFF_DRV_OACTIVE; @@ -3102,8 +3102,6 @@ _exit1: xge_queue_produce_context(xge_hal_device_queue(lldev->devh), XGE_LL_EVENT_TRY_XMIT_AGAIN, lldev->devh); XGE_DRV_STATS(tx_again); - -_exit: } /**