patch-2.4.5 linux/drivers/net/tulip/tulip.h
Next file: linux/drivers/net/tulip/tulip_core.c
Previous file: linux/drivers/net/tulip/pnic.c
Back to the patch index
Back to the overall index
- Lines: 147
- Date:
Sun May 20 12:11:38 2001
- Orig file:
v2.4.4/linux/drivers/net/tulip/tulip.h
- Orig date:
Fri Apr 20 11:54:22 2001
diff -u --recursive --new-file v2.4.4/linux/drivers/net/tulip/tulip.h linux/drivers/net/tulip/tulip.h
@@ -16,6 +16,7 @@
#ifndef __NET_TULIP_H__
#define __NET_TULIP_H__
+#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/spinlock.h>
@@ -27,17 +28,7 @@
/* undefine, or define to various debugging levels (>4 == obscene levels) */
-#undef TULIP_DEBUG
-
-
-#ifdef TULIP_DEBUG
-/* note: prints function name for you */
-#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
-#else
-#define DPRINTK(fmt, args...)
-#endif
-
-
+#define TULIP_DEBUG 1
struct tulip_chip_table {
@@ -62,6 +53,7 @@
IS_ASIX = 0x0200,
HAS_8023X = 0x0400,
COMET_MAC_ADDR = 0x0800,
+ HAS_PCI_MWI = 0x1000,
};
@@ -83,7 +75,6 @@
COMPEX9881,
I21145,
DM910X,
- CONEXANT,
};
@@ -145,8 +136,9 @@
};
-enum tulip_rx_modes {
- FullDuplex = 0x0200,
+enum tulip_mode_bits {
+ TxThreshold = (1 << 22),
+ FullDuplex = (1 << 9),
AcceptBroadcast = 0x0100,
AcceptAllMulticast = 0x0080,
AcceptAllPhys = 0x0040,
@@ -154,6 +146,15 @@
};
+enum tulip_busconfig_bits {
+ MWI = (1 << 24),
+ MRL = (1 << 23),
+ MRM = (1 << 21),
+ CALShift = 14,
+ BurstLenShift = 8,
+};
+
+
/* The Tulip Rx and Tx buffer descriptors. */
struct tulip_rx_desc {
s32 status;
@@ -184,8 +185,8 @@
csr13_cac = (1<<2), /* CSR13/14/15 autoconfiguration */
csr13_srl = (1<<0), /* When reset, resets all SIA functions, machines */
- csr13_mask_auibnc = (csr13_eng | csr13_aui | csr13_cac | csr13_srl),
- csr13_mask_10bt = (csr13_eng | csr13_cac | csr13_srl),
+ csr13_mask_auibnc = (csr13_eng | csr13_aui | csr13_srl),
+ csr13_mask_10bt = (csr13_eng | csr13_srl),
};
enum t21143_csr6_bits {
@@ -255,6 +256,18 @@
#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */
+#define TULIP_MIN_CACHE_LINE 8 /* in units of 32-bit words */
+
+#if defined(__sparc__) || defined(__hppa__)
+/* The UltraSparc PCI controllers will disconnect at every 64-byte
+ * crossing anyways so it makes no sense to tell Tulip to burst
+ * any more than that.
+ */
+#define TULIP_MAX_CACHE_LINE 16 /* in units of 32-bit words */
+#else
+#define TULIP_MAX_CACHE_LINE 32 /* in units of 32-bit words */
+#endif
+
/* Ring-wrap flag in length field, use for last ring entry.
0x01000000 means chain on buffer2 address,
@@ -333,6 +346,13 @@
spinlock_t mii_lock;
unsigned int cur_rx, cur_tx; /* The next free ring entry */
unsigned int dirty_rx, dirty_tx; /* The ring entries to be free()ed. */
+
+#ifdef CONFIG_NET_HW_FLOWCONTROL
+#define RX_A_NBF_STOP 0xffffff3f /* To disable RX and RX-NOBUF ints. */
+ int fc_bit;
+ int mit_sel;
+ int mit_change; /* Signal for Interrupt Mitigtion */
+#endif
unsigned int full_duplex:1; /* Full-duplex operation requested. */
unsigned int full_duplex_lock:1;
unsigned int fake_addr:1; /* Multiport board faked address. */
@@ -345,7 +365,7 @@
unsigned int csr6; /* Current CSR6 control settings. */
unsigned char eeprom[EEPROM_SIZE]; /* Serial EEPROM contents. */
void (*link_change) (struct net_device * dev, int csr5);
- u16 to_advertise; /* NWay capabilities advertised. */
+ u16 sym_advertise, mii_advertise; /* NWay capabilities advertised. */
u16 lpar; /* 21143 Link partner ability. */
u16 advertising[4];
signed char phys[4], mii_cnt; /* MII device addresses. */
@@ -375,6 +395,7 @@
void t21142_timer(unsigned long data);
void t21142_start_nway(struct net_device *dev);
void t21142_lnk_change(struct net_device *dev, int csr5);
+void pnic2_lnk_change(struct net_device *dev, int csr5);
/* eeprom.c */
void tulip_parse_eeprom(struct net_device *dev);
@@ -384,12 +405,14 @@
extern unsigned int tulip_max_interrupt_work;
extern int tulip_rx_copybreak;
void tulip_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
+int tulip_refill_rx(struct net_device *dev);
/* media.c */
int tulip_mdio_read(struct net_device *dev, int phy_id, int location);
void tulip_mdio_write(struct net_device *dev, int phy_id, int location, int value);
void tulip_select_media(struct net_device *dev, int startup);
int tulip_check_duplex(struct net_device *dev);
+void tulip_find_mii (struct net_device *dev, int board_idx);
/* pnic.c */
void pnic_do_nway(struct net_device *dev);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)