vserver 1.9.5.x5
[linux-2.6.git] / include / linux / arcdevice.h
index 9d2429f..7198f12 100644 (file)
@@ -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,14 +335,14 @@ 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);
 irqreturn_t arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs);
-void arcdev_setup(struct net_device *dev);
 struct net_device *alloc_arcdev(char *name);
 void arcnet_rx(struct net_device *dev, int bufnum);