summaryrefslogtreecommitdiff
path: root/include/linux/arcdevice.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.davemloft.net>2004-12-19 23:35:57 -0800
committerDavid S. Miller <davem@nuts.davemloft.net>2004-12-19 23:35:57 -0800
commit87203e63dacae34de76488cb0fbbc3f8e997a6b2 (patch)
tree099160f92ca4d49db3759c3b17bb45c88388df97 /include/linux/arcdevice.h
parent39509e479c8ed347452d4ebc75edad6a20216490 (diff)
parentcceae0d365b18b685cc564071aae22599ebf52a9 (diff)
Merge nuts.davemloft.net:/disk1/BK/network-2.6.11
into nuts.davemloft.net:/disk1/BK/net-2.6.11
Diffstat (limited to 'include/linux/arcdevice.h')
-rw-r--r--include/linux/arcdevice.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/include/linux/arcdevice.h b/include/linux/arcdevice.h
index 9d2429f07a64..bd4364daf948 100644
--- a/include/linux/arcdevice.h
+++ b/include/linux/arcdevice.h
@@ -25,7 +25,6 @@
#define bool int
#endif
-
/*
* RECON_THRESHOLD is the maximum number of RECON messages to receive
* within one minute before printing a "cabling problem" warning. The
@@ -74,6 +73,7 @@
#define D_SKB 1024 /* show skb's */
#define D_SKB_SIZE 2048 /* show skb sizes */
#define D_TIMING 4096 /* show time needed to copy buffers to card */
+#define D_DEBUG 8192 /* Very detailed debug line for line */
#ifndef ARCNET_DEBUG_MAX
#define ARCNET_DEBUG_MAX (127) /* change to ~0 if you want detailed debugging */
@@ -135,6 +135,7 @@ extern int arcnet_debug;
#define TXACKflag 0x02 /* transmitted msg. ackd */
#define RECONflag 0x04 /* network reconfigured */
#define TESTflag 0x08 /* test flag */
+#define EXCNAKflag 0x08 /* excesive nak flag */
#define RESETflag 0x10 /* power-on-reset */
#define RES1flag 0x20 /* reserved - usually set by jumper */
#define RES2flag 0x40 /* reserved - usually set by jumper */
@@ -162,6 +163,8 @@ extern int arcnet_debug;
#define RESETclear 0x08 /* power-on-reset */
#define CONFIGclear 0x10 /* system reconfigured */
+#define EXCNAKclear 0x0E /* Clear and acknowledge the excive nak bit */
+
/* flags for "load test flags" command */
#define TESTload 0x08 /* test flag (diagnostic) */
@@ -187,6 +190,7 @@ extern int arcnet_debug;
struct ArcProto {
char suffix; /* a for RFC1201, e for ether-encap, etc. */
int mtu; /* largest possible packet */
+ int is_ip; /* This is a ip plugin - not a raw thing */
void (*rx) (struct net_device * dev, int bufnum,
struct archdr * pkthdr, int length);
@@ -197,9 +201,11 @@ struct ArcProto {
int (*prepare_tx) (struct net_device * dev, struct archdr * pkt, int length,
int bufnum);
int (*continue_tx) (struct net_device * dev, int bufnum);
+ int (*ack_tx) (struct net_device * dev, int acked);
};
-extern struct ArcProto *arc_proto_map[256], *arc_proto_default, *arc_bcast_proto;
+extern struct ArcProto *arc_proto_map[256], *arc_proto_default,
+ *arc_bcast_proto, *arc_raw_proto;
extern struct ArcProto arc_proto_null;
@@ -251,6 +257,10 @@ struct arcnet_local {
char *card_name; /* card ident string */
int card_flags; /* special card features */
+
+ /* On preemtive and SMB a lock is needed */
+ spinlock_t lock;
+
/*
* Buffer management: an ARCnet card has 4 x 512-byte buffers, each of
* which can be used for either sending or receiving. The new dynamic
@@ -279,6 +289,8 @@ struct arcnet_local {
int num_recons; /* number of RECONs between first and last. */
bool network_down; /* do we think the network is down? */
+ bool excnak_pending; /* We just got an excesive nak interrupt */
+
struct {
uint16_t sequence; /* sequence number (incs with each packet) */
uint16_t aborted_seq;
@@ -323,9 +335,10 @@ void arcnet_dump_skb(struct net_device *dev, struct sk_buff *skb, char *desc);
#endif
#if (ARCNET_DEBUG_MAX & D_RX) || (ARCNET_DEBUG_MAX & D_TX)
-void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc);
+void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc,
+ int take_arcnet_lock);
#else
-#define arcnet_dump_packet(dev, bufnum, desc) ;
+#define arcnet_dump_packet(dev, bufnum, desc,take_arcnet_lock) ;
#endif
void arcnet_unregister_proto(struct ArcProto *proto);