summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-11-18 18:46:21 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-11-18 18:46:21 +0000
commit2e0da3e827c8f4107d384c54290d81b1885a4aa5 (patch)
treef5289267496b192281616d839a26f08ca1f3e447
parent17bad925996b4bee1c5ea5be0e2202faa7a09214 (diff)
add a few comments
-rw-r--r--sys/dev/pci/if_ixgb.c5
-rw-r--r--sys/dev/pci/if_ixgb.h7
2 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c
index 79ca38fc0ef..f2749c10c06 100644
--- a/sys/dev/pci/if_ixgb.c
+++ b/sys/dev/pci/if_ixgb.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_ixgb.c,v 1.30 2006/10/02 00:28:09 brad Exp $ */
+/* $OpenBSD: if_ixgb.c,v 1.31 2006/11/18 18:46:20 brad Exp $ */
#include <dev/pci/if_ixgb.h>
@@ -668,6 +668,7 @@ ixgb_encap(struct ixgb_softc *sc, struct mbuf *m_head)
*/
if (sc->num_tx_desc_avail <= IXGB_TX_CLEANUP_THRESHOLD) {
ixgb_txeof(sc);
+ /* Now do we at least have a minimal? */
if (sc->num_tx_desc_avail <= IXGB_TX_CLEANUP_THRESHOLD) {
sc->no_tx_desc_avail1++;
return (ENOBUFS);
@@ -1399,8 +1400,10 @@ ixgb_txeof(struct ixgb_softc *sc)
*/
if (num_avail > IXGB_TX_CLEANUP_THRESHOLD) {
ifp->if_flags &= ~IFF_OACTIVE;
+ /* All clean, turn off the timer */
if (num_avail == sc->num_tx_desc)
ifp->if_timer = 0;
+ /* Some cleaned, reset the timer */
else if (num_avail != sc->num_tx_desc_avail)
ifp->if_timer = IXGB_TX_TIMEOUT;
}
diff --git a/sys/dev/pci/if_ixgb.h b/sys/dev/pci/if_ixgb.h
index 14ef828665d..be708e5eeee 100644
--- a/sys/dev/pci/if_ixgb.h
+++ b/sys/dev/pci/if_ixgb.h
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_ixgb.h,v 1.8 2006/08/04 14:25:24 brad Exp $ */
+/* $OpenBSD: if_ixgb.h,v 1.9 2006/11/18 18:46:20 brad Exp $ */
#ifndef _IXGB_H_DEFINED_
#define _IXGB_H_DEFINED_
@@ -298,7 +298,10 @@ struct ixgb_softc {
bus_dma_tag_t rxtag; /* dma tag for Rx */
u_int32_t next_rx_desc_to_use;
- /* Jumbo frame */
+ /*
+ * First/last mbuf pointers, for
+ * collecting multisegment RX packets.
+ */
struct mbuf *fmp;
struct mbuf *lmp;