diff options
author | wpaul <wpaul@FreeBSD.org> | 1999-07-14 18:57:32 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1999-07-14 18:57:32 +0000 |
commit | cad926898390cc70f574248e45fa3f2c1a68309e (patch) | |
tree | 4fd36e3174842dc925e67004ea1957e8115749a7 /sys/dev/sk | |
parent | e179e11229b4e38e618443691a7d1a1fdacd7216 (diff) | |
download | FreeBSD-src-cad926898390cc70f574248e45fa3f2c1a68309e.zip FreeBSD-src-cad926898390cc70f574248e45fa3f2c1a68309e.tar.gz |
Revert some changes I had made to try and cut down on the number of TX EOF
interrupts that were scheduled. Testing shows it didn't really do very much
and it makes the code a little more complicated (which is never a good thing).
Also fix the rambuffer offset initialization for the 512K/64K SRAM case
(512K total using 64K chips). It should be 0. The only case with a
non-standard rambuffer offset address is 1024K/64K according to the
SysKonnect manual. (My card has the 1024/64 configuration and I don't know
which card uses the 512/64 configuration, if any, so I'm not sure that
this was really a problem for anyone.)
Diffstat (limited to 'sys/dev/sk')
-rw-r--r-- | sys/dev/sk/if_sk.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index 7fdc268..2edca34 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_sk.c,v 1.1 1999/07/09 04:29:50 wpaul Exp $ + * $Id: if_sk.c,v 1.2 1999/07/09 17:36:23 wpaul Exp $ */ /* @@ -99,7 +99,7 @@ #ifndef lint static const char rcsid[] = - "$Id: if_sk.c,v 1.1 1999/07/09 04:29:50 wpaul Exp $"; + "$Id: if_sk.c,v 1.2 1999/07/09 17:36:23 wpaul Exp $"; #endif static struct sk_type sk_devs[] = { @@ -117,7 +117,7 @@ static void sk_intr_xmac __P((struct sk_if_softc *)); static void sk_rxeof __P((struct sk_if_softc *)); static void sk_txeof __P((struct sk_if_softc *)); static int sk_encap __P((struct sk_if_softc *, struct mbuf *, - u_int32_t *, u_int32_t *)); + u_int32_t *)); static void sk_start __P((struct ifnet *)); static int sk_ioctl __P((struct ifnet *, u_long, caddr_t)); static void sk_init __P((void *)); @@ -1236,7 +1236,7 @@ sk_attach(config_id, unit) switch(sk_win_read_1(sc, SK_EPROM0)) { case SK_RAMSIZE_512K_64: sc->sk_ramsize = 0x80000; - sc->sk_rboff = SK_RBOFF_80000; + sc->sk_rboff = SK_RBOFF_0; break; case SK_RAMSIZE_1024K_64: sc->sk_ramsize = 0x100000; @@ -1294,11 +1294,10 @@ fail: return; } -static int sk_encap(sc_if, m_head, txidx, curidx) +static int sk_encap(sc_if, m_head, txidx) struct sk_if_softc *sc_if; struct mbuf *m_head; u_int32_t *txidx; - u_int32_t *curidx; { struct sk_tx_desc *f = NULL; struct mbuf *m; @@ -1333,13 +1332,13 @@ static int sk_encap(sc_if, m_head, txidx, curidx) if (m != NULL) return(ENOBUFS); - sc_if->sk_rdata->sk_tx_ring[cur].sk_ctl |= SK_TXCTL_LASTFRAG; + sc_if->sk_rdata->sk_tx_ring[cur].sk_ctl |= + SK_TXCTL_LASTFRAG|SK_TXCTL_EOF_INTR; sc_if->sk_cdata.sk_tx_chain[cur].sk_mbuf = m_head; sc_if->sk_rdata->sk_tx_ring[*txidx].sk_ctl |= SK_TXCTL_OWN; sc_if->sk_cdata.sk_tx_cnt += cnt; *txidx = frag; - *curidx = cur; return(0); } @@ -1350,7 +1349,7 @@ static void sk_start(ifp) struct sk_softc *sc; struct sk_if_softc *sc_if; struct mbuf *m_head = NULL; - u_int32_t idx = 0, cur = 0; + u_int32_t idx; sc_if = ifp->if_softc; sc = sc_if->sk_softc; @@ -1367,7 +1366,7 @@ static void sk_start(ifp) * don't have room, set the OACTIVE flag and wait * for the NIC to drain the ring. */ - if (sk_encap(sc_if, m_head, &idx, &cur)) { + if (sk_encap(sc_if, m_head, &idx)) { IF_PREPEND(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; break; @@ -1385,7 +1384,6 @@ static void sk_start(ifp) /* Transmit */ sc_if->sk_cdata.sk_tx_prod = idx; - sc_if->sk_rdata->sk_tx_ring[cur].sk_ctl |= SK_TXCTL_EOF_INTR; CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START); /* Set a timeout in case the chip goes out to lunch. */ |