/* Display warnings about the driver being an ALPHA version. */ #undef ALPHA_WARNING
/* *Debuggingbitflags:eachoptioncanbeenabledindividually. * *Note:onlydebugflagsincludedintheARCNET_DEBUG_MAXdefinewill *actuallybeavailable.GCCwill(atleast,GCC2.7.0will)notice *linesusingaBUGLVLnotinARCNET_DEBUG_MAXandautomaticallyoptimize *themout.
*/ #define D_NORMAL 1/* important operational info */ #define D_EXTRA 2/* useful, but non-vital information */ #define D_INIT 4/* show init/probe messages */ #define D_INIT_REASONS 8/* show reasons for discarding probes */ #define D_RECON 32/* print a message whenever token is lost */ #define D_PROTO 64/* debug auto-protocol support */ /* debug levels below give LOTS of output during normal operation! */ #define D_DURING 128/* trace operations (including irq's) */ #define D_TX 256/* show tx packets */ #define D_RX 512/* show rx packets */ #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 */ #endif
/* card feature flags, set during auto-detection. *(currentlyonlyusedbycom20020pci)
*/ #define ARC_IS_5MBIT 1/* card default speed is 5MBit */ #define ARC_CAN_10MBIT 2/* card uses COM20022, supporting 10MBit,
but default is 2.5MBit. */ #define ARC_HAS_LED 4/* card has software controlled LEDs */ #define ARC_HAS_ROTARY 8/* card has rotary encoder */
/* information needed to define an encapsulation driver */ 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); int (*build_header)(struct sk_buff *skb, struct net_device *dev, unsignedshort ethproto, uint8_t daddr);
/* these functions return '1' if the skb can now be freed */ 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);
};
/* *"Incoming"isinformationneededforeachaddressthatcouldbesending *tous.Mostlyforpartially-receivedsplitpackets.
*/ struct Incoming { struct sk_buff *skb; /* packet data buffer */
__be16 sequence; /* sequence number of assembly */
uint8_t lastpacket, /* number of last packet (from 1) */
numpackets; /* number of packets in split */
};
/* only needed for RFC1201 */ struct Outgoing { struct ArcProto *proto; /* protocol driver that owns this: *ifNULL,nopacketispending.
*/ struct sk_buff *skb; /* buffer from upper levels */ struct archdr *pkt; /* a pointer into the skb */
uint16_t length, /* bytes total */
dataleft, /* bytes left */
segnum, /* segment being sent */
numsegs; /* number of segments */
};
#define ARCNET_LED_NAME_SZ (IFNAMSIZ + 6)
struct arcnet_local {
uint8_t config, /* current value of CONFIG register */
timeout, /* Extended timeout for COM20020 */
backplane, /* Backplane flag for COM20020 */
clockp, /* COM20020 clock divider */
clockm, /* COM20020 clock multiplier flag */
setup, /* Contents of setup1 register */
setup2, /* Contents of setup2 register */
intmask; /* current value of INTMASK register */
uint8_t default_proto[256]; /* default encap to use for each host */ int cur_tx, /* buffer used by current transmit, or -1 */
next_tx, /* buffer where a packet is ready to send */
cur_rx; /* current receive buffer */ int lastload_dest, /* can last loaded packet be acked? */
lasttrans_dest; /* can last TX'd packet be acked? */ int timed_out; /* need to process TX timeout and drop packet */ unsignedlong last_timeout; /* time of last reported timeout */ char *card_name; /* card ident string */ int card_flags; /* special card features */
/* On preemtive and SMB a lock is needed */
spinlock_t lock;
/* network "reconfiguration" handling */ unsignedlong first_recon; /* time of "first" RECON message to count */ unsignedlong last_recon; /* time of most recent RECON */ int num_recons; /* number of RECONs between first and last. */ int network_down; /* do we think the network is down? */
int excnak_pending; /* We just got an excesive nak interrupt */
/* RESET flag handling */ int reset_in_progress; struct work_struct reset_work;
struct {
uint16_t sequence; /* sequence number (incs with each packet) */
__be16 aborted_seq;
struct Incoming incoming[256]; /* one from each address */
} rfc1201;
/* really only used by rfc1201, but we'll pretend it's not */ struct Outgoing outgoing; /* packet currently being sent */
/* hardware-specific functions */ struct { struct module *owner; void (*command)(struct net_device *dev, int cmd); int (*status)(struct net_device *dev); void (*intmask)(struct net_device *dev, int mask); int (*reset)(struct net_device *dev, int really_reset); void (*open)(struct net_device *dev); void (*close)(struct net_device *dev); void (*datatrigger) (struct net_device * dev, int enable); void (*recontrigger) (struct net_device * dev, int enable);
void (*copy_to_card)(struct net_device *dev, int bufnum, int offset, void *buf, int count); void (*copy_from_card)(struct net_device *dev, int bufnum, int offset, void *buf, int count);
} hw;
void __iomem *mem_start; /* pointer to ioremap'ed MMIO */
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.