Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2003 12:42:43 -0700 (PDT)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 36130 for review
Message-ID:  <200308141942.h7EJghp2070143@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=36130

Change 36130 by sam@sam_ebb on 2003/08/14 12:42:20

	reorder code in sis_start to defer work until we know we need it

Affected files ...

.. //depot/projects/netperf/sys/pci/if_sis.c#4 edit

Differences ...

==== //depot/projects/netperf/sys/pci/if_sis.c#4 (text+ko) ====

@@ -1967,7 +1967,6 @@
 	struct ifnet		*ifp;
 {
 	struct sis_softc	*sc;
-	struct mbuf		*m_head = NULL;
 	u_int32_t		idx;
 
 	sc = ifp->if_softc;
@@ -1977,15 +1976,15 @@
 		SIS_UNLOCK(sc);
 		return;
 	}
-
-	idx = sc->sis_cdata.sis_tx_prod;
-
 	if (ifp->if_flags & IFF_OACTIVE) {
 		SIS_UNLOCK(sc);
 		return;
 	}
 
+	idx = sc->sis_cdata.sis_tx_prod;
 	while(sc->sis_ldata.sis_tx_list[idx].sis_mbuf == NULL) {
+		struct mbuf		*m_head;
+
 		IF_DEQUEUE(&ifp->if_snd, m_head);
 		if (m_head == NULL)
 			break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308141942.h7EJghp2070143>