summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_pcn.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2002-06-30 22:16:22 +0000
committerluigi <luigi@FreeBSD.org>2002-06-30 22:16:22 +0000
commit36987f382b7fcdcfd13a44439a02485f0f5150c2 (patch)
tree41f1d8fea6c1dbafda2fd3657a1b9a706aca88e7 /sys/pci/if_pcn.c
parentaf57fcc7716390be1b44583d20c263e9e7099d0d (diff)
downloadFreeBSD-src-36987f382b7fcdcfd13a44439a02485f0f5150c2.zip
FreeBSD-src-36987f382b7fcdcfd13a44439a02485f0f5150c2.tar.gz
Fix if_timer logic to make sure that there is always a timeout
pending if there are packets queued for transmission. Several drivers still have the same problem. MFC after: 3 days
Diffstat (limited to 'sys/pci/if_pcn.c')
-rw-r--r--sys/pci/if_pcn.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/pci/if_pcn.c b/sys/pci/if_pcn.c
index f027900..bd54fcd 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;
}
OpenPOWER on IntegriCloud