svn commit: r199554 - head/sys/dev/nxge

John Baldwin jhb at FreeBSD.org
Thu Nov 19 21:47:55 UTC 2009


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:
 }
 
 /**


More information about the svn-src-head mailing list