]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/staging/dgnc/dgnc_driver.h
Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb...
[karo-tx-linux.git] / drivers / staging / dgnc / dgnc_driver.h
1 /*
2  * Copyright 2003 Digi International (www.digi.com)
3  *      Scott H Kilau <Scott_Kilau at digi dot com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2, or (at your option)
8  * any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
12  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  * PURPOSE.  See the GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  *
19  *      NOTE: THIS IS A SHARED HEADER. DO NOT CHANGE CODING STYLE!!!
20  *
21  *************************************************************************
22  *
23  * Driver includes
24  *
25  *************************************************************************/
26
27 #ifndef __DGNC_DRIVER_H
28 #define __DGNC_DRIVER_H
29
30 #include <linux/types.h>        /* To pick up the varions Linux types */
31 #include <linux/tty.h>    /* To pick up the various tty structs/defines */
32 #include <linux/interrupt.h>    /* For irqreturn_t type */
33
34 #include "dgnc_types.h"         /* Additional types needed by the Digi header files */
35 #include "digi.h"               /* Digi specific ioctl header */
36 #include "dgnc_kcompat.h"       /* Kernel 2.4/2.6 compat includes */
37 #include "dgnc_sysfs.h"         /* Support for SYSFS */
38
39 /*************************************************************************
40  *
41  * Driver defines
42  *
43  *************************************************************************/
44
45 /*
46  * Driver identification, error and debugging statments
47  *
48  * In theory, you can change all occurrences of "digi" in the next
49  * three lines, and the driver printk's will all automagically change.
50  *
51  * APR((fmt, args, ...));       Always prints message
52  * DPR((fmt, args, ...));       Only prints if DGNC_TRACER is defined at
53  *                                compile time and dgnc_debug!=0
54  */
55 #define PROCSTR         "dgnc"                  /* /proc entries         */
56 #define DEVSTR          "/dev/dg/dgnc"          /* /dev entries          */
57 #define DRVSTR          "dgnc"                  /* Driver name string
58                                                  * displayed by APR      */
59 #define APR(args)       do { PRINTF_TO_KMEM(args); printk(DRVSTR": "); printk args; \
60                            } while (0)
61 #define RAPR(args)      do { PRINTF_TO_KMEM(args); printk args; } while (0)
62
63 #define TRC_TO_CONSOLE 1
64
65 /*
66  * Debugging levels can be set using debug insmod variable
67  * They can also be compiled out completely.
68  */
69
70 #define DBG_INIT                (dgnc_debug & 0x01)
71 #define DBG_BASIC               (dgnc_debug & 0x02)
72 #define DBG_CORE                (dgnc_debug & 0x04)
73
74 #define DBG_OPEN                (dgnc_debug & 0x08)
75 #define DBG_CLOSE               (dgnc_debug & 0x10)
76 #define DBG_READ                (dgnc_debug & 0x20)
77 #define DBG_WRITE               (dgnc_debug & 0x40)
78
79 #define DBG_IOCTL               (dgnc_debug & 0x80)
80
81 #define DBG_PROC                (dgnc_debug & 0x100)
82 #define DBG_PARAM               (dgnc_debug & 0x200)
83 #define DBG_PSCAN               (dgnc_debug & 0x400)
84 #define DBG_EVENT               (dgnc_debug & 0x800)
85
86 #define DBG_DRAIN               (dgnc_debug & 0x1000)
87 #define DBG_MSIGS               (dgnc_debug & 0x2000)
88
89 #define DBG_MGMT                (dgnc_debug & 0x4000)
90 #define DBG_INTR                (dgnc_debug & 0x8000)
91
92 #define DBG_CARR                (dgnc_debug & 0x10000)
93
94
95 #if defined(DGNC_TRACER)
96
97 # if defined(TRC_TO_KMEM)
98 /* Choose one: */
99 #  define TRC_ON_OVERFLOW_WRAP_AROUND
100 #  undef  TRC_ON_OVERFLOW_SHIFT_BUFFER
101 # endif //TRC_TO_KMEM
102
103 # define TRC_MAXMSG             1024
104 # define TRC_OVERFLOW           "(OVERFLOW)"
105 # define TRC_DTRC               "/usr/bin/dtrc"
106
107 #if defined TRC_TO_CONSOLE
108 #define PRINTF_TO_CONSOLE(args) { printk(DRVSTR": "); printk args; }
109 #else //!defined TRACE_TO_CONSOLE
110 #define PRINTF_TO_CONSOLE(args)
111 #endif
112
113 #if defined TRC_TO_KMEM
114 #define PRINTF_TO_KMEM(args) dgnc_tracef args
115 #else //!defined TRC_TO_KMEM
116 #define PRINTF_TO_KMEM(args)
117 #endif
118
119 #define TRC(args)       { PRINTF_TO_KMEM(args); PRINTF_TO_CONSOLE(args) }
120
121 # define DPR_INIT(ARGS)         if (DBG_INIT) TRC(ARGS)
122 # define DPR_BASIC(ARGS)        if (DBG_BASIC) TRC(ARGS)
123 # define DPR_CORE(ARGS)         if (DBG_CORE) TRC(ARGS)
124 # define DPR_OPEN(ARGS)         if (DBG_OPEN)  TRC(ARGS)
125 # define DPR_CLOSE(ARGS)        if (DBG_CLOSE)  TRC(ARGS)
126 # define DPR_READ(ARGS)         if (DBG_READ)  TRC(ARGS)
127 # define DPR_WRITE(ARGS)        if (DBG_WRITE) TRC(ARGS)
128 # define DPR_IOCTL(ARGS)        if (DBG_IOCTL) TRC(ARGS)
129 # define DPR_PROC(ARGS)         if (DBG_PROC)  TRC(ARGS)
130 # define DPR_PARAM(ARGS)        if (DBG_PARAM)  TRC(ARGS)
131 # define DPR_PSCAN(ARGS)        if (DBG_PSCAN)  TRC(ARGS)
132 # define DPR_EVENT(ARGS)        if (DBG_EVENT)  TRC(ARGS)
133 # define DPR_DRAIN(ARGS)        if (DBG_DRAIN)  TRC(ARGS)
134 # define DPR_CARR(ARGS)         if (DBG_CARR)  TRC(ARGS)
135 # define DPR_MGMT(ARGS)         if (DBG_MGMT)  TRC(ARGS)
136 # define DPR_INTR(ARGS)         if (DBG_INTR)  TRC(ARGS)
137 # define DPR_MSIGS(ARGS)        if (DBG_MSIGS)  TRC(ARGS)
138
139 # define DPR(ARGS)              if (dgnc_debug) TRC(ARGS)
140 # define P(X)                   dgnc_tracef(#X "=%p\n", X)
141 # define X(X)                   dgnc_tracef(#X "=%x\n", X)
142
143 #else//!defined DGNC_TRACER
144
145 #define PRINTF_TO_KMEM(args)
146 # define TRC(ARGS)
147 # define DPR_INIT(ARGS)
148 # define DPR_BASIC(ARGS)
149 # define DPR_CORE(ARGS)
150 # define DPR_OPEN(ARGS)
151 # define DPR_CLOSE(ARGS)
152 # define DPR_READ(ARGS)
153 # define DPR_WRITE(ARGS)
154 # define DPR_IOCTL(ARGS)
155 # define DPR_PROC(ARGS)
156 # define DPR_PARAM(ARGS)
157 # define DPR_PSCAN(ARGS)
158 # define DPR_EVENT(ARGS)
159 # define DPR_DRAIN(ARGS)
160 # define DPR_CARR(ARGS)
161 # define DPR_MGMT(ARGS)
162 # define DPR_INTR(ARGS)
163 # define DPR_MSIGS(ARGS)
164
165 # define DPR(args)
166
167 #endif//DGNC_TRACER
168
169 /* Number of boards we support at once. */
170 #define MAXBOARDS       20
171 #define MAXPORTS        8
172 #define MAXTTYNAMELEN   200
173
174 /* Our 3 magic numbers for our board, channel and unit structs */
175 #define DGNC_BOARD_MAGIC        0x5c6df104
176 #define DGNC_CHANNEL_MAGIC      0x6c6df104
177 #define DGNC_UNIT_MAGIC         0x7c6df104
178
179 /* Serial port types */
180 #define DGNC_SERIAL             0
181 #define DGNC_PRINT              1
182
183 #define SERIAL_TYPE_NORMAL      1
184
185 #define PORT_NUM(dev)   ((dev) & 0x7f)
186 #define IS_PRINT(dev)   (((dev) & 0xff) >= 0x80)
187
188 /* MAX number of stop characters we will send when our read queue is getting full */
189 #define MAX_STOPS_SENT 5
190
191 /* 4 extra for alignment play space */
192 #define WRITEBUFLEN             ((4096) + 4)
193 #define MYFLIPLEN               N_TTY_BUF_SIZE
194
195 #define dgnc_jiffies_from_ms(a) (((a) * HZ) / 1000)
196
197 /*
198  * Define a local default termios struct. All ports will be created
199  * with this termios initially.  This is the same structure that is defined
200  * as the default in tty_io.c with the same settings overriden as in serial.c
201  *
202  * In short, this should match the internal serial ports' defaults.
203  */
204 #define DEFAULT_IFLAGS  (ICRNL | IXON)
205 #define DEFAULT_OFLAGS  (OPOST | ONLCR)
206 #define DEFAULT_CFLAGS  (B9600 | CS8 | CREAD | HUPCL | CLOCAL)
207 #define DEFAULT_LFLAGS  (ISIG | ICANON | ECHO | ECHOE | ECHOK | \
208                         ECHOCTL | ECHOKE | IEXTEN)
209
210 #ifndef _POSIX_VDISABLE
211 #define   _POSIX_VDISABLE '\0'
212 #endif
213
214 #define SNIFF_MAX       65536           /* Sniff buffer size (2^n) */
215 #define SNIFF_MASK      (SNIFF_MAX - 1) /* Sniff wrap mask */
216
217 /*
218  * Lock function/defines.
219  * Makes spotting lock/unlock locations easier.
220  */
221 # define DGNC_SPINLOCK_INIT(x)          spin_lock_init(&(x))
222 # define DGNC_LOCK(x,y)                 spin_lock_irqsave(&(x), y)
223 # define DGNC_UNLOCK(x,y)               spin_unlock_irqrestore(&(x), y)
224
225 /*
226  * All the possible states the driver can be while being loaded.
227  */
228 enum {
229         DRIVER_INITIALIZED = 0,
230         DRIVER_READY
231 };
232
233 /*
234  * All the possible states the board can be while booting up.
235  */
236 enum {
237         BOARD_FAILED = 0,
238         BOARD_FOUND,
239         BOARD_READY
240 };
241
242
243 /*************************************************************************
244  *
245  * Structures and closely related defines.
246  *
247  *************************************************************************/
248
249 struct dgnc_board;
250 struct channel_t;
251
252 /************************************************************************
253  * Per board operations structure                                      *
254  ************************************************************************/
255 struct board_ops {
256         void (*tasklet) (unsigned long data);
257         irqreturn_t (*intr) (int irq, void *voidbrd);
258         void (*uart_init) (struct channel_t *ch);
259         void (*uart_off) (struct channel_t *ch);
260         int  (*drain) (struct tty_struct *tty, uint seconds);
261         void (*param) (struct tty_struct *tty);
262         void (*vpd) (struct dgnc_board *brd);
263         void (*assert_modem_signals) (struct channel_t *ch);
264         void (*flush_uart_write) (struct channel_t *ch);
265         void (*flush_uart_read) (struct channel_t *ch);
266         void (*disable_receiver) (struct channel_t *ch);
267         void (*enable_receiver) (struct channel_t *ch);
268         void (*send_break) (struct channel_t *ch, int);
269         void (*send_start_character) (struct channel_t *ch);
270         void (*send_stop_character) (struct channel_t *ch);
271         void (*copy_data_from_queue_to_uart) (struct channel_t *ch);
272         uint (*get_uart_bytes_left) (struct channel_t *ch);
273         void (*send_immediate_char) (struct channel_t *ch, unsigned char);
274 };
275
276 /************************************************************************
277  * Device flag definitions for bd_flags.
278  ************************************************************************/
279 #define BD_IS_PCI_EXPRESS     0x0001      /* Is a PCI Express board */
280
281
282 /*
283  *      Per-board information
284  */
285 struct dgnc_board {
286         int             magic;          /* Board Magic number.  */
287         int             boardnum;       /* Board number: 0-32 */
288
289         int             type;           /* Type of board */
290         char            *name;          /* Product Name */
291         struct pci_dev  *pdev;          /* Pointer to the pci_dev struct */
292         unsigned long   bd_flags;       /* Board flags */
293         u16             vendor;         /* PCI vendor ID */
294         u16             device;         /* PCI device ID */
295         u16             subvendor;      /* PCI subsystem vendor ID */
296         u16             subdevice;      /* PCI subsystem device ID */
297         uchar           rev;            /* PCI revision ID */
298         uint            pci_bus;        /* PCI bus value */
299         uint            pci_slot;       /* PCI slot value */
300         uint            maxports;       /* MAX ports this board can handle */
301         uchar           dvid;           /* Board specific device id */
302         uchar           vpd[128];       /* VPD of board, if found */
303         uchar           serial_num[20]; /* Serial number of board, if found in VPD */
304
305         spinlock_t      bd_lock;        /* Used to protect board */
306
307         spinlock_t      bd_intr_lock;   /* Used to protect the poller tasklet and
308                                          * the interrupt routine from each other.
309                                          */
310
311         uint            state;          /* State of card. */
312         wait_queue_head_t state_wait;   /* Place to sleep on for state change */
313
314         struct          tasklet_struct helper_tasklet; /* Poll helper tasklet */
315
316         uint            nasync;         /* Number of ports on card */
317
318         uint            irq;            /* Interrupt request number */
319         ulong           intr_count;     /* Count of interrupts */
320         ulong           intr_modem;     /* Count of interrupts */
321         ulong           intr_tx;        /* Count of interrupts */
322         ulong           intr_rx;        /* Count of interrupts */
323
324         ulong           membase;        /* Start of base memory of the card */
325         ulong           membase_end;    /* End of base memory of the card */
326
327         u8 __iomem              *re_map_membase;/* Remapped memory of the card */
328
329         ulong           iobase;         /* Start of io base of the card */
330         ulong           iobase_end;     /* End of io base of the card */
331
332         uint            bd_uart_offset; /* Space between each UART */
333
334         struct channel_t *channels[MAXPORTS]; /* array of pointers to our channels. */
335
336         struct tty_driver       SerialDriver;
337         char            SerialName[200];
338         struct tty_driver       PrintDriver;
339         char            PrintName[200];
340
341         uint            dgnc_Major_Serial_Registered;
342         uint            dgnc_Major_TransparentPrint_Registered;
343
344         uint            dgnc_Serial_Major;
345         uint            dgnc_TransparentPrint_Major;
346
347         uint            TtyRefCnt;
348
349         char            *flipbuf;       /* Our flip buffer, alloced if board is found */
350
351         u16             dpatype;        /* The board "type", as defined by DPA */
352         u16             dpastatus;      /* The board "status", as defined by DPA */
353
354         /*
355          *      Mgmt data.
356          */
357         char            *msgbuf_head;
358         char            *msgbuf;
359
360         uint            bd_dividend;    /* Board/UARTs specific dividend */
361
362         struct board_ops *bd_ops;
363
364         /* /proc/<board> entries */
365         struct proc_dir_entry *proc_entry_pointer;
366         struct dgnc_proc_entry *dgnc_board_table;
367
368 };
369
370
371 /************************************************************************
372  * Unit flag definitions for un_flags.
373  ************************************************************************/
374 #define UN_ISOPEN       0x0001          /* Device is open               */
375 #define UN_CLOSING      0x0002          /* Line is being closed         */
376 #define UN_IMM          0x0004          /* Service immediately          */
377 #define UN_BUSY         0x0008          /* Some work this channel       */
378 #define UN_BREAKI       0x0010          /* Input break received         */
379 #define UN_PWAIT        0x0020          /* Printer waiting for terminal */
380 #define UN_TIME         0x0040          /* Waiting on time              */
381 #define UN_EMPTY        0x0080          /* Waiting output queue empty   */
382 #define UN_LOW          0x0100          /* Waiting output low water mark*/
383 #define UN_EXCL_OPEN    0x0200          /* Open for exclusive use       */
384 #define UN_WOPEN        0x0400          /* Device waiting for open      */
385 #define UN_WIOCTL       0x0800          /* Device waiting for open      */
386 #define UN_HANGUP       0x8000          /* Carrier lost                 */
387
388 struct device;
389
390 /************************************************************************
391  * Structure for terminal or printer unit.
392  ************************************************************************/
393 struct un_t {
394         int     magic;          /* Unit Magic Number.                   */
395         struct  channel_t *un_ch;
396         ulong   un_time;
397         uint    un_type;
398         uint    un_open_count;  /* Counter of opens to port             */
399         struct tty_struct *un_tty;/* Pointer to unit tty structure      */
400         uint    un_flags;       /* Unit flags                           */
401         wait_queue_head_t un_flags_wait; /* Place to sleep to wait on unit */
402         uint    un_dev;         /* Minor device number                  */
403         struct device *un_sysfs;
404 };
405
406
407 /************************************************************************
408  * Device flag definitions for ch_flags.
409  ************************************************************************/
410 #define CH_PRON         0x0001          /* Printer on string            */
411 #define CH_STOP         0x0002          /* Output is stopped            */
412 #define CH_STOPI        0x0004          /* Input is stopped             */
413 #define CH_CD           0x0008          /* Carrier is present           */
414 #define CH_FCAR         0x0010          /* Carrier forced on            */
415 #define CH_HANGUP       0x0020          /* Hangup received              */
416
417 #define CH_RECEIVER_OFF 0x0040          /* Receiver is off              */
418 #define CH_OPENING      0x0080          /* Port in fragile open state   */
419 #define CH_CLOSING      0x0100          /* Port in fragile close state  */
420 #define CH_FIFO_ENABLED 0x0200          /* Port has FIFOs enabled       */
421 #define CH_TX_FIFO_EMPTY 0x0400         /* TX Fifo is completely empty  */
422 #define CH_TX_FIFO_LWM  0x0800          /* TX Fifo is below Low Water   */
423 #define CH_BREAK_SENDING 0x1000         /* Break is being sent          */
424 #define CH_LOOPBACK 0x2000              /* Channel is in lookback mode  */
425 #define CH_FLIPBUF_IN_USE 0x4000        /* Channel's flipbuf is in use  */
426 #define CH_BAUD0        0x08000         /* Used for checking B0 transitions */
427 #define CH_FORCED_STOP  0x20000         /* Output is forcibly stopped   */
428 #define CH_FORCED_STOPI 0x40000         /* Input is forcibly stopped    */
429
430 /*
431  * Definitions for ch_sniff_flags
432  */
433 #define SNIFF_OPEN      0x1
434 #define SNIFF_WAIT_DATA 0x2
435 #define SNIFF_WAIT_SPACE 0x4
436
437
438 /* Our Read/Error/Write queue sizes */
439 #define RQUEUEMASK      0x1FFF          /* 8 K - 1 */
440 #define EQUEUEMASK      0x1FFF          /* 8 K - 1 */
441 #define WQUEUEMASK      0x0FFF          /* 4 K - 1 */
442 #define RQUEUESIZE      (RQUEUEMASK + 1)
443 #define EQUEUESIZE      RQUEUESIZE
444 #define WQUEUESIZE      (WQUEUEMASK + 1)
445
446
447 /************************************************************************
448  * Channel information structure.
449  ************************************************************************/
450 struct channel_t {
451         int magic;                      /* Channel Magic Number         */
452         struct dgnc_board       *ch_bd;         /* Board structure pointer      */
453         struct digi_t   ch_digi;        /* Transparent Print structure  */
454         struct un_t     ch_tun;         /* Terminal unit info      */
455         struct un_t     ch_pun;         /* Printer unit info        */
456
457         spinlock_t      ch_lock;        /* provide for serialization */
458         wait_queue_head_t ch_flags_wait;
459
460         uint            ch_portnum;     /* Port number, 0 offset.       */
461         uint            ch_open_count;  /* open count                   */
462         uint            ch_flags;       /* Channel flags                */
463
464         ulong           ch_close_delay; /* How long we should drop RTS/DTR for */
465
466         ulong           ch_cpstime;     /* Time for CPS calculations    */
467
468         tcflag_t        ch_c_iflag;     /* channel iflags              */
469         tcflag_t        ch_c_cflag;     /* channel cflags              */
470         tcflag_t        ch_c_oflag;     /* channel oflags              */
471         tcflag_t        ch_c_lflag;     /* channel lflags              */
472         uchar           ch_stopc;       /* Stop character              */
473         uchar           ch_startc;      /* Start character            */
474
475         uint            ch_old_baud;    /* Cache of the current baud */
476         uint            ch_custom_speed;/* Custom baud, if set */
477
478         uint            ch_wopen;       /* Waiting for open process cnt */
479
480         uchar           ch_mostat;      /* FEP output modem status      */
481         uchar           ch_mistat;      /* FEP input modem status       */
482
483         struct neo_uart_struct __iomem *ch_neo_uart;    /* Pointer to the "mapped" UART struct */
484         struct cls_uart_struct __iomem *ch_cls_uart;    /* Pointer to the "mapped" UART struct */
485
486         uchar           ch_cached_lsr;  /* Cached value of the LSR register */
487
488         uchar           *ch_rqueue;     /* Our read queue buffer - malloc'ed */
489         ushort          ch_r_head;      /* Head location of the read queue */
490         ushort          ch_r_tail;      /* Tail location of the read queue */
491
492         uchar           *ch_equeue;     /* Our error queue buffer - malloc'ed */
493         ushort          ch_e_head;      /* Head location of the error queue */
494         ushort          ch_e_tail;      /* Tail location of the error queue */
495
496         uchar           *ch_wqueue;     /* Our write queue buffer - malloc'ed */
497         ushort          ch_w_head;      /* Head location of the write queue */
498         ushort          ch_w_tail;      /* Tail location of the write queue */
499
500         ulong           ch_rxcount;     /* total of data received so far */
501         ulong           ch_txcount;     /* total of data transmitted so far */
502
503         uchar           ch_r_tlevel;    /* Receive Trigger level */
504         uchar           ch_t_tlevel;    /* Transmit Trigger level */
505
506         uchar           ch_r_watermark; /* Receive Watermark */
507
508         ulong           ch_stop_sending_break;  /* Time we should STOP sending a break */
509
510         uint            ch_stops_sent;  /* How many times I have sent a stop character
511                                          * to try to stop the other guy sending.
512                                          */
513         ulong           ch_err_parity;  /* Count of parity errors on channel */
514         ulong           ch_err_frame;   /* Count of framing errors on channel */
515         ulong           ch_err_break;   /* Count of breaks on channel */
516         ulong           ch_err_overrun; /* Count of overruns on channel */
517
518         ulong           ch_xon_sends;   /* Count of xons transmitted */
519         ulong           ch_xoff_sends;  /* Count of xoffs transmitted */
520
521         ulong           ch_intr_modem;  /* Count of interrupts */
522         ulong           ch_intr_tx;     /* Count of interrupts */
523         ulong           ch_intr_rx;     /* Count of interrupts */
524
525
526         /* /proc/<board>/<channel> entries */
527         struct proc_dir_entry *proc_entry_pointer;
528         struct dgnc_proc_entry *dgnc_channel_table;
529
530         uint ch_sniff_in;
531         uint ch_sniff_out;
532         char *ch_sniff_buf;             /* Sniff buffer for proc */
533         ulong ch_sniff_flags;           /* Channel flags                */
534         wait_queue_head_t ch_sniff_wait;
535 };
536
537
538 /*************************************************************************
539  *
540  * Prototypes for non-static functions used in more than one module
541  *
542  *************************************************************************/
543
544 extern int              dgnc_ms_sleep(ulong ms);
545 extern char             *dgnc_ioctl_name(int cmd);
546
547 /*
548  * Our Global Variables.
549  */
550 extern int              dgnc_driver_state;      /* The state of the driver      */
551 extern uint             dgnc_Major;             /* Our driver/mgmt major        */
552 extern int              dgnc_debug;             /* Debug variable               */
553 extern int              dgnc_rawreadok;         /* Set if user wants rawreads   */
554 extern int              dgnc_poll_tick;         /* Poll interval - 20 ms        */
555 extern int              dgnc_trcbuf_size;       /* Size of the ringbuffer       */
556 extern spinlock_t       dgnc_global_lock;       /* Driver global spinlock       */
557 extern uint             dgnc_NumBoards;         /* Total number of boards       */
558 extern struct dgnc_board        *dgnc_Board[MAXBOARDS]; /* Array of board structs       */
559 extern ulong            dgnc_poll_counter;      /* Times the poller has run     */
560 extern char             *dgnc_state_text[];     /* Array of state text          */
561 extern char             *dgnc_driver_state_text[];/* Array of driver state text */
562
563 #endif