summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/staging/dgnc/dgnc_driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/staging/dgnc/dgnc_driver.h')
-rw-r--r--kernel/drivers/staging/dgnc/dgnc_driver.h71
1 files changed, 45 insertions, 26 deletions
diff --git a/kernel/drivers/staging/dgnc/dgnc_driver.h b/kernel/drivers/staging/dgnc/dgnc_driver.h
index f77fed57b..ce7cd9b96 100644
--- a/kernel/drivers/staging/dgnc/dgnc_driver.h
+++ b/kernel/drivers/staging/dgnc/dgnc_driver.h
@@ -21,9 +21,9 @@
#ifndef __DGNC_DRIVER_H
#define __DGNC_DRIVER_H
-#include <linux/types.h> /* To pick up the varions Linux types */
-#include <linux/tty.h> /* To pick up the various tty structs/defines */
-#include <linux/interrupt.h> /* For irqreturn_t type */
+#include <linux/types.h>
+#include <linux/tty.h>
+#include <linux/interrupt.h>
#include "digi.h" /* Digi specific ioctl header */
#include "dgnc_sysfs.h" /* Support for SYSFS */
@@ -61,19 +61,20 @@
#define PORT_NUM(dev) ((dev) & 0x7f)
#define IS_PRINT(dev) (((dev) & 0xff) >= 0x80)
-/* MAX number of stop characters we will send when our read queue is getting full */
+/* MAX number of stop characters we will send
+ * when our read queue is getting full
+ */
#define MAX_STOPS_SENT 5
/* 4 extra for alignment play space */
#define WRITEBUFLEN ((4096) + 4)
-#define MYFLIPLEN N_TTY_BUF_SIZE
#define dgnc_jiffies_from_ms(a) (((a) * HZ) / 1000)
/*
* Define a local default termios struct. All ports will be created
* with this termios initially. This is the same structure that is defined
- * as the default in tty_io.c with the same settings overriden as in serial.c
+ * as the default in tty_io.c with the same settings overridden as in serial.c
*
* In short, this should match the internal serial ports' defaults.
*/
@@ -166,12 +167,15 @@ struct dgnc_board {
uint maxports; /* MAX ports this board can handle */
unsigned char dvid; /* Board specific device id */
unsigned char vpd[128]; /* VPD of board, if found */
- unsigned char serial_num[20]; /* Serial number of board, if found in VPD */
+ unsigned char serial_num[20]; /* Serial number of board,
+ * if found in VPD
+ */
spinlock_t bd_lock; /* Used to protect board */
- spinlock_t bd_intr_lock; /* Used to protect the poller tasklet and
- * the interrupt routine from each other.
+ spinlock_t bd_intr_lock; /* Used to protect the poller tasklet
+ * and the interrupt routine from each
+ * other.
*/
uint state; /* State of card. */
@@ -190,14 +194,16 @@ struct dgnc_board {
ulong membase; /* Start of base memory of the card */
ulong membase_end; /* End of base memory of the card */
- u8 __iomem *re_map_membase;/* Remapped memory of the card */
+ u8 __iomem *re_map_membase; /* Remapped memory of the card */
ulong iobase; /* Start of io base of the card */
ulong iobase_end; /* End of io base of the card */
uint bd_uart_offset; /* Space between each UART */
- struct channel_t *channels[MAXPORTS]; /* array of pointers to our channels. */
+ struct channel_t *channels[MAXPORTS]; /* array of pointers
+ * to our channels.
+ */
struct tty_driver SerialDriver;
char SerialName[200];
@@ -212,10 +218,12 @@ struct dgnc_board {
uint TtyRefCnt;
- char *flipbuf; /* Our flip buffer, alloced if board is found */
-
- u16 dpatype; /* The board "type", as defined by DPA */
- u16 dpastatus; /* The board "status", as defined by DPA */
+ u16 dpatype; /* The board "type",
+ * as defined by DPA
+ */
+ u16 dpastatus; /* The board "status",
+ * as defined by DPA
+ */
/*
* Mgmt data.
@@ -288,7 +296,6 @@ struct un_t {
#define CH_TX_FIFO_LWM 0x0800 /* TX Fifo is below Low Water */
#define CH_BREAK_SENDING 0x1000 /* Break is being sent */
#define CH_LOOPBACK 0x2000 /* Channel is in lookback mode */
-#define CH_FLIPBUF_IN_USE 0x4000 /* Channel's flipbuf is in use */
#define CH_BAUD0 0x08000 /* Used for checking B0 transitions */
#define CH_FORCED_STOP 0x20000 /* Output is forcibly stopped */
#define CH_FORCED_STOPI 0x40000 /* Input is forcibly stopped */
@@ -308,7 +315,7 @@ struct un_t {
************************************************************************/
struct channel_t {
int magic; /* Channel Magic Number */
- struct dgnc_board *ch_bd; /* Board structure pointer */
+ struct dgnc_board *ch_bd; /* Board structure pointer */
struct digi_t ch_digi; /* Transparent Print structure */
struct un_t ch_tun; /* Terminal unit info */
struct un_t ch_pun; /* Printer unit info */
@@ -320,7 +327,9 @@ struct channel_t {
uint ch_open_count; /* open count */
uint ch_flags; /* Channel flags */
- ulong ch_close_delay; /* How long we should drop RTS/DTR for */
+ ulong ch_close_delay; /* How long we should
+ * drop RTS/DTR for
+ */
ulong ch_cpstime; /* Time for CPS calculations */
@@ -336,11 +345,15 @@ struct channel_t {
uint ch_wopen; /* Waiting for open process cnt */
- unsigned char ch_mostat; /* FEP output modem status */
- unsigned char ch_mistat; /* FEP input modem status */
+ unsigned char ch_mostat; /* FEP output modem status */
+ unsigned char ch_mistat; /* FEP input modem status */
- struct neo_uart_struct __iomem *ch_neo_uart; /* Pointer to the "mapped" UART struct */
- struct cls_uart_struct __iomem *ch_cls_uart; /* Pointer to the "mapped" UART struct */
+ struct neo_uart_struct __iomem *ch_neo_uart; /* Pointer to the
+ * "mapped" UART struct
+ */
+ struct cls_uart_struct __iomem *ch_cls_uart; /* Pointer to the
+ * "mapped" UART struct
+ */
unsigned char ch_cached_lsr; /* Cached value of the LSR register */
@@ -364,10 +377,13 @@ struct channel_t {
unsigned char ch_r_watermark; /* Receive Watermark */
- ulong ch_stop_sending_break; /* Time we should STOP sending a break */
+ ulong ch_stop_sending_break; /* Time we should STOP
+ * sending a break
+ */
- uint ch_stops_sent; /* How many times I have sent a stop character
- * to try to stop the other guy sending.
+ uint ch_stops_sent; /* How many times I have sent a stop
+ * character to try to stop the other
+ * guy sending.
*/
ulong ch_err_parity; /* Count of parity errors on channel */
ulong ch_err_frame; /* Count of framing errors on channel */
@@ -394,7 +410,10 @@ struct channel_t {
extern uint dgnc_Major; /* Our driver/mgmt major */
extern int dgnc_poll_tick; /* Poll interval - 20 ms */
extern spinlock_t dgnc_global_lock; /* Driver global spinlock */
+extern spinlock_t dgnc_poll_lock; /* Poll scheduling lock */
extern uint dgnc_NumBoards; /* Total number of boards */
-extern struct dgnc_board *dgnc_Board[MAXBOARDS]; /* Array of board structs */
+extern struct dgnc_board *dgnc_Board[MAXBOARDS]; /* Array of board
+ * structs
+ */
#endif