diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2007-01-26 15:29:11 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2007-01-26 15:29:11 +0000 |
commit | 6a782cae436e033ea60abbcb8cb986260ed1c33b (patch) | |
tree | 706465e601706d6ee32c569a657b56f8ec7a0710 /sys | |
parent | 3b7376f73f4bf83023b8165f9dc4f2721bbf2998 (diff) |
remove duplicate test; from brad
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/re.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index 6121ce23ca6..5686dd0f121 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.62 2007/01/23 13:42:47 mglocker Exp $ */ +/* $OpenBSD: re.c,v 1.63 2007/01/26 15:29:10 jason Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1396,25 +1396,24 @@ re_txeof(struct rl_softc *sc) ifp->if_flags &= ~IFF_OACTIVE; } - /* - * Some chips will ignore a second TX request issued while an - * existing transmission is in progress. If the transmitter goes - * idle but there are still packets waiting to be sent, we need - * to restart the channel here to flush them out. This only seems - * to be required with the PCIe devices. - */ - if (sc->rl_ldata.rl_tx_free < RL_TX_DESC_CNT(sc)) - CSR_WRITE_1(sc, sc->rl_txstart, RL_TXSTART_START); + if (sc->rl_ldata.rl_tx_free < RL_TX_DESC_CNT(sc)) { + /* + * Some chips will ignore a second TX request issued while an + * existing transmission is in progress. If the transmitter goes + * idle but there are still packets waiting to be sent, we need + * to restart the channel here to flush them out. This only + * seems to be required with the PCIe devices. + */ + CSR_WRITE_1(sc, sc->rl_txstart, RL_TXSTART_START); - /* - * If not all descriptors have been released reaped yet, - * reload the timer so that we will eventually get another - * interrupt that will cause us to re-enter this routine. - * This is done in case the transmitter has gone idle. - */ - if (sc->rl_ldata.rl_tx_free < RL_TX_DESC_CNT(sc)) - CSR_WRITE_4(sc, RL_TIMERCNT, 1); - else + /* + * If not all descriptors have been released reaped yet, + * reload the timer so that we will eventually get another + * interrupt that will cause us to re-enter this routine. + * This is done in case the transmitter has gone idle. + */ + CSR_WRITE_4(sc, RL_TIMERCNT, 1); + } else ifp->if_timer = 0; } |