aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2002-06-30 22:16:22 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2002-06-30 22:16:22 +0000
commit2e4fb41fa595a807db045235618be5b844ab5bec (patch)
tree41f1d8fea6c1dbafda2fd3657a1b9a706aca88e7
parentbcb9ef4fe6a81398ce6a6e1c0e2f43ff055b4279 (diff)
Notes
-rw-r--r--sys/pci/if_pcn.c12
-rw-r--r--sys/pci/if_rl.c6
2 files changed, 8 insertions, 10 deletions
diff --git a/sys/pci/if_pcn.c b/sys/pci/if_pcn.c
index f02790066b0b1..bd54fcdd88ee5 100644
--- a/sys/pci/if_pcn.c
+++ b/sys/pci/if_pcn.c
@@ -860,9 +860,6 @@ static void pcn_txeof(sc)
ifp = &sc->arpcom.ac_if;
- /* Clear the timeout timer. */
- ifp->if_timer = 0;
-
/*
* Go through our tx list and free mbufs for those
* frames that have been transmitted.
@@ -899,13 +896,14 @@ static void pcn_txeof(sc)
sc->pcn_cdata.pcn_tx_cnt--;
PCN_INC(idx, PCN_TX_LIST_CNT);
- ifp->if_timer = 0;
}
- sc->pcn_cdata.pcn_tx_cons = idx;
-
- if (cur_tx != NULL)
+ if (idx != sc->pcn_cdata.pcn_tx_cons) {
+ /* Some buffers have been freed. */
+ sc->pcn_cdata.pcn_tx_cons = idx;
ifp->if_flags &= ~IFF_OACTIVE;
+ }
+ ifp->if_timer = (sc->pcn_cdata.pcn_tx_cnt == 0) ? 0 : 5;
return;
}
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c
index 99ef4dda399a2..4ffe7a3f99168 100644
--- a/sys/pci/if_rl.c
+++ b/sys/pci/if_rl.c
@@ -1292,9 +1292,6 @@ static void rl_txeof(sc)
ifp = &sc->arpcom.ac_if;
- /* Clear the timeout timer. */
- ifp->if_timer = 0;
-
/*
* Go through our tx list and free mbufs for those
* frames that have been uploaded.
@@ -1337,6 +1334,9 @@ static void rl_txeof(sc)
ifp->if_flags &= ~IFF_OACTIVE;
} while (sc->rl_cdata.last_tx != sc->rl_cdata.cur_tx);
+ ifp->if_timer =
+ (sc->rl_cdata.last_tx == sc->rl_cdata.cur_tx) ? 0 : 5;
+
return;
}