summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2001-06-30 14:16:55 +0000
committerthorpej <thorpej@NetBSD.org>2001-06-30 14:16:55 +0000
commit291a21d3fb115f3f5c82b8da75ead657b28e83bc (patch)
tree2770691632385e19b045cd0d6cfdbda5b2ce758f /sys/dev
parent29455521b5caefaca262ff58976cc6e6fd5060a2 (diff)
Move the `ti_tx_ring_nic' pointer out of the ring-data structure
and into the softc. Garbage-collect the `ti_cmd_ring' pointer, since bus_space is properly used to access the command ring.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_ti.c10
-rw-r--r--sys/dev/pci/if_tireg.h5
2 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c
index 73c138dd33c..7a0fc4d4979 100644
--- a/sys/dev/pci/if_ti.c
+++ b/sys/dev/pci/if_ti.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.29 2001/06/30 05:48:24 thorpej Exp $ */
+/* $NetBSD: if_ti.c,v 1.30 2001/06/30 14:16:55 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1555,7 +1555,7 @@ static int ti_gibinit(sc)
*/
CSR_WRITE_4(sc, TI_WINBASE, TI_TX_RING_BASE);
if (sc->ti_hwrev == TI_HWREV_TIGON) {
- sc->ti_rdata->ti_tx_ring_nic =
+ sc->ti_tx_ring_nic =
(struct ti_tx_desc *)(sc->ti_vhandle + TI_WINDOW);
}
bzero((char *)sc->ti_rdata->ti_tx_ring,
@@ -2109,7 +2109,7 @@ static void ti_txeof(sc)
else
CSR_WRITE_4(sc, TI_WINBASE,
TI_TX_RING_BASE);
- cur_tx = &sc->ti_rdata->ti_tx_ring_nic[idx % 128];
+ cur_tx = &sc->ti_tx_ring_nic[idx % 128];
} else
cur_tx = &sc->ti_rdata->ti_tx_ring[idx];
if (cur_tx->ti_flags & TI_BDFLAG_END)
@@ -2258,7 +2258,7 @@ static int ti_encap(sc, m_head, txidx)
else
CSR_WRITE_4(sc, TI_WINBASE,
TI_TX_RING_BASE);
- f = &sc->ti_rdata->ti_tx_ring_nic[frag % 128];
+ f = &sc->ti_tx_ring_nic[frag % 128];
} else
f = &sc->ti_rdata->ti_tx_ring[frag];
if (sc->ti_cdata.ti_tx_chain[frag] != NULL)
@@ -2291,7 +2291,7 @@ static int ti_encap(sc, m_head, txidx)
return(ENOBUFS);
if (sc->ti_hwrev == TI_HWREV_TIGON)
- sc->ti_rdata->ti_tx_ring_nic[cur % 128].ti_flags |=
+ sc->ti_tx_ring_nic[cur % 128].ti_flags |=
TI_BDFLAG_END;
else
sc->ti_rdata->ti_tx_ring[cur].ti_flags |= TI_BDFLAG_END;
diff --git a/sys/dev/pci/if_tireg.h b/sys/dev/pci/if_tireg.h
index e511bc3a8fb..2516eb62ae3 100644
--- a/sys/dev/pci/if_tireg.h
+++ b/sys/dev/pci/if_tireg.h
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tireg.h,v 1.5 2001/06/03 03:29:44 thorpej Exp $ */
+/* $NetBSD: if_tireg.h,v 1.6 2001/06/30 14:16:55 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1020,8 +1020,6 @@ struct ti_ring_data {
u_int32_t ti_pad1[6];
struct ti_producer ti_tx_considx_r;
u_int32_t ti_pad2[6];
- struct ti_tx_desc *ti_tx_ring_nic;/* pointer to shared mem */
- struct ti_cmd_desc *ti_cmd_ring; /* pointer to shared mem */
struct ti_gib ti_info;
};
@@ -1085,6 +1083,7 @@ struct ti_softc {
u_int8_t ti_copper; /* 1000baseTX card */
u_int8_t ti_linkstat; /* Link state */
struct ti_ring_data *ti_rdata; /* rings */
+ struct ti_tx_desc *ti_tx_ring_nic;/* pointer to shared mem */
struct ti_chain_data ti_cdata; /* mbufs */
#define ti_ev_prodidx ti_rdata->ti_ev_prodidx_r
#define ti_return_prodidx ti_rdata->ti_return_prodidx_r