summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_sis.c
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2004-10-08 16:14:42 +0000
committermlaier <mlaier@FreeBSD.org>2004-10-08 16:14:42 +0000
commitb5e56e2ca94c36a11a6f85a78382b218156e054b (patch)
treeed4084a8a1bf712a55ee3fbbfd4c4abc2d589c0d /sys/pci/if_sis.c
parent94efc7605774ab918c26765ad2ff86c64e37ecc7 (diff)
downloadFreeBSD-src-b5e56e2ca94c36a11a6f85a78382b218156e054b.zip
FreeBSD-src-b5e56e2ca94c36a11a6f85a78382b218156e054b.tar.gz
Fix sis, bfe and ndis in the same way dc was fixed:
Do not tell the hardware to send when there were no packets enqueued. Found and reviewed by: green MFC after: 1 days
Diffstat (limited to 'sys/pci/if_sis.c')
-rw-r--r--sys/pci/if_sis.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c
index 6a30c7e..0fe85ab 100644
--- a/sys/pci/if_sis.c
+++ b/sys/pci/if_sis.c
@@ -1954,7 +1954,7 @@ sis_start(ifp)
{
struct sis_softc *sc;
struct mbuf *m_head = NULL;
- u_int32_t idx;
+ u_int32_t idx, queued = 0;
sc = ifp->if_softc;
SIS_LOCK(sc);
@@ -1982,6 +1982,8 @@ sis_start(ifp)
break;
}
+ queued++;
+
/*
* If there's a BPF listener, bounce a copy of this frame
* to him.
@@ -1990,14 +1992,16 @@ sis_start(ifp)
}
- /* Transmit */
- sc->sis_cdata.sis_tx_prod = idx;
- SIS_SETBIT(sc, SIS_CSR, SIS_CSR_TX_ENABLE);
+ if (queued) {
+ /* Transmit */
+ sc->sis_cdata.sis_tx_prod = idx;
+ SIS_SETBIT(sc, SIS_CSR, SIS_CSR_TX_ENABLE);
- /*
- * Set a timeout in case the chip goes out to lunch.
- */
- ifp->if_timer = 5;
+ /*
+ * Set a timeout in case the chip goes out to lunch.
+ */
+ ifp->if_timer = 5;
+ }
SIS_UNLOCK(sc);
OpenPOWER on IntegriCloud