rpc: add an rpc_pipe_open method
[safe/jmp/linux-2.6] / include / linux / cyclades.h
index 121d64c..2d3d1e0 100644 (file)
@@ -177,7 +177,7 @@ struct      CUSTOM_REG {
        __u32   fpga_version;           /* FPGA Version Number Register */
        __u32   cpu_start;              /* CPU start Register (write) */
        __u32   cpu_stop;               /* CPU stop Register (write) */
-       __u32   misc_reg;               /* Miscelaneous Register */
+       __u32   misc_reg;               /* Miscellaneous Register */
        __u32   idt_mode;               /* IDT mode Register */
        __u32   uart_irq_status;        /* UART IRQ status Register */
        __u32   clear_timer0_irq;       /* Clear timer interrupt Register */
@@ -512,12 +512,13 @@ struct cyclades_card {
     void __iomem *base_addr;
     void __iomem *ctl_addr;
     int irq;
-    int num_chips;     /* 0 if card absent, -1 if Z/PCI, else Y */
-    int first_line;    /* minor number of first channel on card */
-    int nports;                /* Number of ports in the card */
-    int bus_index;     /* address shift - 0 for ISA, 1 for PCI */
-    int        intr_enabled;   /* FW Interrupt flag - 0 disabled, 1 enabled */
+    unsigned int num_chips;    /* 0 if card absent, -1 if Z/PCI, else Y */
+    unsigned int first_line;   /* minor number of first channel on card */
+    unsigned int nports;       /* Number of ports in the card */
+    int bus_index;             /* address shift - 0 for ISA, 1 for PCI */
+    int intr_enabled;          /* FW Interrupt flag - 0 disabled, 1 enabled */
     spinlock_t card_lock;
+    struct cyclades_port *ports;
 };
 
 /***************************************
@@ -549,11 +550,11 @@ struct cyclades_icount {
 
 struct cyclades_port {
        int                     magic;
+       struct tty_port         port;
        struct cyclades_card    *card;
        int                     line;
        int                     flags;          /* defined in tty.h */
        int                     type;           /* UART type */
-       struct tty_struct       *tty;
        int                     read_status_mask;
        int                     ignore_status_mask;
        int                     timeout;
@@ -565,50 +566,26 @@ struct cyclades_port {
        int                     rtsdtr_inv;
        int                     chip_rev;
        int                     custom_divisor;
-       int                     x_char; /* to be pushed out ASAP */
-       int                     close_delay;
-       unsigned short          closing_wait;
-       unsigned long           event;
-       unsigned long           last_active;
-       int                     count;  /* # of fd on device */
+       u8                      x_char; /* to be pushed out ASAP */
        int                     breakon;
        int                     breakoff;
-       int                     blocked_open; /* # of blocked opens */
-       unsigned char           *xmit_buf;
        int                     xmit_head;
        int                     xmit_tail;
        int                     xmit_cnt;
         int                     default_threshold;
         int                     default_timeout;
-       unsigned long           jiffies[3];
        unsigned long           rflush_count;
        struct cyclades_monitor mon;
        struct cyclades_idle_stats      idle_stats;
        struct cyclades_icount  icount;
-       struct work_struct      tqueue;
-       wait_queue_head_t       open_wait;
-       wait_queue_head_t       close_wait;
-       wait_queue_head_t       shutdown_wait;
+       struct completion       shutdown_wait;
        wait_queue_head_t       delta_msr_wait;
        int throttle;
 };
 
-/*
- * Events are used to schedule things to happen at timer-interrupt
- * time, instead of at cy interrupt time.
- */
-#define Cy_EVENT_READ_PROCESS          0
-#define Cy_EVENT_WRITE_WAKEUP          1
-#define Cy_EVENT_HANGUP                        2
-#define Cy_EVENT_BREAK                 3
-#define Cy_EVENT_OPEN_WAKEUP           4
-#define Cy_EVENT_SHUTDOWN_WAKEUP       5
-#define        Cy_EVENT_DELTA_WAKEUP           6
-#define        Cy_EVENT_Z_RX_FULL              7
-
 #define        CLOSING_WAIT_DELAY      30*HZ
-#define CY_CLOSING_WAIT_NONE   65535
-#define CY_CLOSING_WAIT_INF    0
+#define CY_CLOSING_WAIT_NONE   ASYNC_CLOSING_WAIT_NONE
+#define CY_CLOSING_WAIT_INF    ASYNC_CLOSING_WAIT_INF
 
 
 #define CyMAX_CHIPS_PER_CARD   8