diff options
author | wpaul <wpaul@FreeBSD.org> | 1999-12-07 20:14:42 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1999-12-07 20:14:42 +0000 |
commit | a960f35b96d0e82f23a1260155303522f35c631b (patch) | |
tree | a9db3f88415e573f4402f3e5e3e54fdc55319182 /sys/pci/if_stereg.h | |
parent | 0e463632a3ead6327de2d89a1bd77d328dea7150 (diff) | |
download | FreeBSD-src-a960f35b96d0e82f23a1260155303522f35c631b.zip FreeBSD-src-a960f35b96d0e82f23a1260155303522f35c631b.tar.gz |
Spruce up the Sundance ST201 driver:
- Convert to using TX descritor polling similar to the xl driver (the
ST201 is a clone of the 3c90xB chipset and offers the same transmit
polling scheme). This should reduce TX overhad a little.
- Make sure to reset PHY when switching mode, as in the starfire driver.
- Fix instances of free() that should be contigfree().
- Remove dead code.
Diffstat (limited to 'sys/pci/if_stereg.h')
-rw-r--r-- | sys/pci/if_stereg.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/sys/pci/if_stereg.h b/sys/pci/if_stereg.h index 8f7d035..7a0b487 100644 --- a/sys/pci/if_stereg.h +++ b/sys/pci/if_stereg.h @@ -454,12 +454,13 @@ struct ste_desc_onefrag { #define CSR_READ_1(sc, reg) \ bus_space_read_1(sc->ste_btag, sc->ste_bhandle, reg) -#define STE_TIMEOUT 1000 -#define STE_MIN_FRAMELEN 60 -#define STE_PACKET_SIZE 1536 -#define ETHER_ALIGN 2 -#define STE_RX_LIST_CNT 128 -#define STE_TX_LIST_CNT 256 +#define STE_TIMEOUT 1000 +#define STE_MIN_FRAMELEN 60 +#define STE_PACKET_SIZE 1536 +#define ETHER_ALIGN 2 +#define STE_RX_LIST_CNT 128 +#define STE_TX_LIST_CNT 256 +#define STE_INC(x, y) (x) = (x + 1) % y struct ste_type { u_int16_t ste_vid; @@ -477,6 +478,8 @@ struct ste_chain { struct ste_desc *ste_ptr; struct mbuf *ste_mbuf; struct ste_chain *ste_next; + struct ste_chain *ste_prev; + u_int32_t ste_phys; }; struct ste_chain_onefrag { @@ -490,9 +493,9 @@ struct ste_chain_data { struct ste_chain ste_tx_chain[STE_TX_LIST_CNT]; struct ste_chain_onefrag *ste_rx_head; - struct ste_chain *ste_tx_head; - struct ste_chain *ste_tx_tail; - struct ste_chain *ste_tx_free; + int ste_tx_prod; + int ste_tx_cons; + int ste_tx_cnt; }; struct ste_softc { @@ -506,6 +509,8 @@ struct ste_softc { device_t ste_miibus; int ste_unit; int ste_tx_thresh; + u_int8_t ste_link; + int ste_if_flags; struct ste_list_data *ste_ldata; struct ste_chain_data ste_cdata; struct callout_handle ste_stat_ch; |