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.
This commit is contained in:
parent
29455521b5
commit
291a21d3fb
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue