Back out new "hme" driver because it causes a performance regression on
"netio" on an U5.
This commit is contained in:
parent
ef4781fc59
commit
e75321130b
758
sys/dev/ic/hme.c
758
sys/dev/ic/hme.c
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hmereg.h,v 1.10 2001/11/26 06:51:13 tron Exp $ */
|
||||
/* $NetBSD: hmereg.h,v 1.11 2001/11/26 10:39:29 tron Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -87,13 +87,18 @@
|
|||
#define HME_SEB_STAT_TXTERR 0x20000000 /* tag error durig tx dma */
|
||||
#define HME_SEB_STAT_SLVERR 0x40000000 /* pio access error */
|
||||
#define HME_SEB_STAT_SLVPERR 0x80000000 /* pio access parity error */
|
||||
#define HME_SEB_STAT_BITS \
|
||||
"\020\1RX\2RCNT\3ACNT\4CCNT\5LCNT\6RFIFO\7CVCNT\10STST" \
|
||||
"\11TX\12TFIFO\13MAXPKT\14NCNT\15ECNT\16LCCNT\17FCNT" \
|
||||
"\20DTIME\21RXHOST\22NORXD\23RXE\24EXLATE\25RXP\26RXT\27EOP" \
|
||||
"\30MIF\31TXHOST\32TXALL\33TXE\34TXL\35TXP\36TXT\37SLV" \
|
||||
"\40SLVP"
|
||||
|
||||
#define HME_SEB_STAT_BITS "\177\020" \
|
||||
"b\0GOTFRAME\0b\1RCNTEXP\0b\2ACNTEXP\0" \
|
||||
"b\3CCNTEXP\0b\4LCNTEXP\0b\5RFIFOVF\0" \
|
||||
"b\6CVCNTEXP\0b\7STSTERR\0b\10SENTFRAME\0" \
|
||||
"b\11TFIFO_UND\0b\12MAXPKTERR\0b\13NCNTEXP\0" \
|
||||
"b\14ECNTEXP\0b\15LCCNTEXP\0b\16FCNTEXP\0" \
|
||||
"b\17DTIMEXP\0b\20RXTOHOST\0b\21NORXD\0" \
|
||||
"b\22RXERR\0b\23RXLATERR\0b\24RXPERR\0" \
|
||||
"b\25RXTERR\0b\26EOPERR\0b\27MIFIRQ\0" \
|
||||
"b\30HOSTTOTX\0b\31TXALL\0b\32XTEACK\0" \
|
||||
"b\33TXLERR\0b\34TXPERR\0b\35TXTERR\0" \
|
||||
"b\36SLVERR\0b\37SLVPERR\0\0"
|
||||
|
||||
#define HME_SEB_STAT_ALL_ERRORS \
|
||||
(HME_SEB_STAT_SLVPERR | HME_SEB_STAT_SLVERR | HME_SEB_STAT_TXTERR |\
|
||||
|
@ -103,7 +108,8 @@
|
|||
HME_SEB_STAT_DTIMEXP | HME_SEB_STAT_FCNTEXP | HME_SEB_STAT_LCCNTEXP |\
|
||||
HME_SEB_STAT_ECNTEXP | HME_SEB_STAT_NCNTEXP | HME_SEB_STAT_MAXPKTERR|\
|
||||
HME_SEB_STAT_TFIFO_UND| HME_SEB_STAT_STSTERR | HME_SEB_STAT_CVCNTEXP |\
|
||||
HME_SEB_STAT_LCNTEXP | HME_SEB_STAT_CCNTEXP| HME_SEB_STAT_ACNTEXP)
|
||||
HME_SEB_STAT_RFIFOVF | HME_SEB_STAT_LCNTEXP | HME_SEB_STAT_CCNTEXP |\
|
||||
HME_SEB_STAT_ACNTEXP)
|
||||
|
||||
#define HME_SEB_STAT_VLAN_ERRORS \
|
||||
(HME_SEB_STAT_SLVPERR | HME_SEB_STAT_SLVERR | HME_SEB_STAT_TXTERR |\
|
||||
|
@ -113,7 +119,8 @@
|
|||
HME_SEB_STAT_DTIMEXP | HME_SEB_STAT_FCNTEXP | HME_SEB_STAT_LCCNTEXP |\
|
||||
HME_SEB_STAT_ECNTEXP | HME_SEB_STAT_NCNTEXP | \
|
||||
HME_SEB_STAT_TFIFO_UND| HME_SEB_STAT_STSTERR | HME_SEB_STAT_CVCNTEXP |\
|
||||
HME_SEB_STAT_LCNTEXP | HME_SEB_STAT_CCNTEXP | HME_SEB_STAT_ACNTEXP)
|
||||
HME_SEB_STAT_RFIFOVF | HME_SEB_STAT_LCNTEXP | HME_SEB_STAT_CCNTEXP |\
|
||||
HME_SEB_STAT_ACNTEXP)
|
||||
|
||||
/*
|
||||
* HME Transmitter register offsets
|
||||
|
@ -305,6 +312,3 @@ struct hme_xd {
|
|||
#define HME_XD_DECODE_TSIZE(flags) \
|
||||
(((flags) & HME_XD_TXLENMSK) >> 0)
|
||||
|
||||
#define HME_MTU \
|
||||
(ETHERMTU + ETHER_VLAN_ENCAP_LEN + sizeof(u_int32_t) + \
|
||||
sizeof(struct ether_header))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hmevar.h,v 1.7 2001/11/25 22:12:01 tron Exp $ */
|
||||
/* $NetBSD: hmevar.h,v 1.8 2001/11/26 10:39:29 tron Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -43,17 +43,6 @@
|
|||
#include <sys/rnd.h>
|
||||
#endif
|
||||
|
||||
#define HME_TX_RING_SIZE 128
|
||||
#define HME_RX_RING_SIZE 128
|
||||
#define HME_RX_RING_MAX 256
|
||||
#define HME_TX_RING_MAX 256
|
||||
#define HME_RX_PKTSIZE 1600
|
||||
|
||||
struct hme_sxd {
|
||||
struct mbuf *sd_mbuf; /* descriptor mbuf */
|
||||
bus_dmamap_t sd_map; /* descriptor dmamap */
|
||||
int sd_loaded; /* descriptor dmamap loaded? */
|
||||
};
|
||||
|
||||
struct hme_ring {
|
||||
/* Ring Descriptors */
|
||||
|
@ -63,6 +52,15 @@ struct hme_ring {
|
|||
bus_addr_t rb_txddma; /* DMA address of same */
|
||||
caddr_t rb_rxd; /* Receive descriptors */
|
||||
bus_addr_t rb_rxddma; /* DMA address of same */
|
||||
caddr_t rb_txbuf; /* Transmit buffers */
|
||||
caddr_t rb_rxbuf; /* Receive buffers */
|
||||
int rb_ntbuf; /* # of transmit buffers */
|
||||
int rb_nrbuf; /* # of receive buffers */
|
||||
|
||||
/* Ring Descriptor state */
|
||||
int rb_tdhead, rb_tdtail;
|
||||
int rb_rdtail;
|
||||
int rb_td_nbusy;
|
||||
};
|
||||
|
||||
struct hme_softc {
|
||||
|
@ -88,6 +86,12 @@ struct hme_softc {
|
|||
|
||||
/* Ring descriptor */
|
||||
struct hme_ring sc_rb;
|
||||
#if notused
|
||||
void (*sc_copytobuf) __P((struct hme_softc *,
|
||||
void *, void *, size_t));
|
||||
void (*sc_copyfrombuf) __P((struct hme_softc *,
|
||||
void *, void *, size_t));
|
||||
#endif
|
||||
|
||||
int sc_debug;
|
||||
void *sc_sh; /* shutdownhook cookie */
|
||||
|
@ -97,10 +101,6 @@ struct hme_softc {
|
|||
void (*sc_hwreset) __P((struct hme_softc *));
|
||||
void (*sc_hwinit) __P((struct hme_softc *));
|
||||
|
||||
struct hme_sxd sc_txd[HME_TX_RING_MAX], sc_rxd[HME_RX_RING_MAX];
|
||||
bus_dmamap_t sc_rxmap_spare;
|
||||
int sc_tx_cnt, sc_tx_prod, sc_tx_cons;
|
||||
int sc_last_rd;
|
||||
#if NRND > 0
|
||||
rndsource_element_t rnd_source;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue