Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

mxser.c File Reference

#include <linux/config.h>
#include <linux/module.h>
#include <linux/version.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/serial.h>
#include <linux/serial_reg.h>
#include <linux/major.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/mm.h>
#include <linux/smp_lock.h>
#include <linux/pci.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/segment.h>
#include <asm/bitops.h>
#include <asm/uaccess.h>

Include dependency graph for mxser.c:

Go to the source code of this file.

Data Structures

struct  mxser_mstatus

Defines

#define MXSER_VERSION   "1.1kern"
#define MXSERMAJOR   174
#define MXSERCUMAJOR   175
#define MXSER_EVENT_TXLOW   1
#define MXSER_EVENT_HANGUP   2
#define SERIAL_DO_RESTART
#define MXSER_BOARDS   4
#define MXSER_PORTS   32
#define MXSER_PORTS_PER_BOARD   8
#define MXSER_ISR_PASS_LIMIT   256
#define MXSER_ERR_IOADDR   -1
#define MXSER_ERR_IRQ   -2
#define MXSER_ERR_IRQ_CONFLIT   -3
#define MXSER_ERR_VECTOR   -4
#define SERIAL_TYPE_NORMAL   1
#define SERIAL_TYPE_CALLOUT   2
#define WAKEUP_CHARS   256
#define UART_MCR_AFE   0x20
#define UART_LSR_SPECIAL   0x1E
#define PORTNO(x)   (MINOR((x)->device) - (x)->driver.minor_start)
#define RELEVANT_IFLAG(iflag)   (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
#define IRQ_T(info)   ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define PCI_VENDOR_ID_MOXA   0x1393
#define PCI_DEVICE_ID_C168   0x1680
#define PCI_DEVICE_ID_C104   0x1040
#define C168_ASIC_ID   1
#define C104_ASIC_ID   2
#define CI104J_ASIC_ID   5
#define MOXA   0x400
#define MOXA_GETDATACOUNT   (MOXA + 23)
#define MOXA_GET_CONF   (MOXA + 35)
#define MOXA_DIAGNOSE   (MOXA + 50)
#define MOXA_CHKPORTENABLE   (MOXA + 60)
#define MOXA_HighSpeedOn   (MOXA + 61)
#define MOXA_GET_MAJOR   (MOXA + 63)
#define MOXA_GET_CUMAJOR   (MOXA + 64)
#define MOXA_GETMSTATUS   (MOXA + 65)
#define B921600   (B460800 +1)
#define CHIP_SK   0x01
#define CHIP_DO   0x02
#define CHIP_CS   0x04
#define CHIP_DI   0x08
#define EN_CCMD   0x000
#define EN0_RSARLO   0x008
#define EN0_RSARHI   0x009
#define EN0_RCNTLO   0x00A
#define EN0_RCNTHI   0x00B
#define EN0_DCFG   0x00E
#define EN0_PORT   0x010
#define ENC_PAGE0   0x000
#define ENC_PAGE3   0x0C0

Typedefs

typedef _moxa_pci_info moxa_pci_info

Enumerations

enum  {
  MXSER_BOARD_C168_ISA = 1, MXSER_BOARD_C104_ISA, MXSER_BOARD_CI104J, MXSER_BOARD_C168_PCI,
  MXSER_BOARD_C104_PCI
}

Functions

static void mxser_getcfg (int board, struct mxser_hwconf *hwconf)
int mxser_init (void)
static int mxser_get_ISA_conf (int, struct mxser_hwconf *)
static int mxser_get_PCI_conf (int, int, int, struct mxser_hwconf *)
static void mxser_do_softint (void *)
static int mxser_open (struct tty_struct *, struct file *)
static void mxser_close (struct tty_struct *, struct file *)
static int mxser_write (struct tty_struct *, int, const unsigned char *, int)
static int mxser_write_room (struct tty_struct *)
static void mxser_flush_buffer (struct tty_struct *)
static int mxser_chars_in_buffer (struct tty_struct *)
static void mxser_flush_chars (struct tty_struct *)
static void mxser_put_char (struct tty_struct *, unsigned char)
static int mxser_ioctl (struct tty_struct *, struct file *, uint, ulong)
static int mxser_ioctl_special (unsigned int, unsigned long)
static void mxser_throttle (struct tty_struct *)
static void mxser_unthrottle (struct tty_struct *)
static void mxser_set_termios (struct tty_struct *, struct termios *)
static void mxser_stop (struct tty_struct *)
static void mxser_start (struct tty_struct *)
static void mxser_hangup (struct tty_struct *)
static void mxser_interrupt (int, void *, struct pt_regs *)
static void mxser_receive_chars (struct mxser_struct *, int *)
static void mxser_transmit_chars (struct mxser_struct *)
static void mxser_check_modem_status (struct mxser_struct *, int)
static int mxser_block_til_ready (struct tty_struct *, struct file *, struct mxser_struct *)
static int mxser_startup (struct mxser_struct *)
static void mxser_shutdown (struct mxser_struct *)
static int mxser_change_speed (struct mxser_struct *, struct termios *old_termios)
static int mxser_get_serial_info (struct mxser_struct *, struct serial_struct *)
static int mxser_set_serial_info (struct mxser_struct *, struct serial_struct *)
static int mxser_get_lsr_info (struct mxser_struct *, unsigned int *)
static void mxser_send_break (struct mxser_struct *, int)
static int mxser_get_modem_info (struct mxser_struct *, unsigned int *)
static int mxser_set_modem_info (struct mxser_struct *, unsigned int, unsigned int *)
int mxser_initbrd (int board, struct mxser_hwconf *hwconf)
static int mxser_ioctl (struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
static int mxser_read_register (int, unsigned short *)
static int mxser_program_mode (int)
static void mxser_normal_mode (int)

Variables

static char * mxser_brdname []
static int mxser_numports []
static mxser_pciinfo mxser_pcibrds []
static int ioaddr [MXSER_BOARDS] = {0, 0, 0, 0}
static int ttymajor = MXSERMAJOR
static int calloutmajor = MXSERCUMAJOR
static int verbose = 0
static struct mxser_mstatus GMStatus [MXSER_PORTS]
static int mxserBoardCAP [MXSER_BOARDS]
static struct tty_driver mxvar_sdriver mxvar_cdriver
static int mxvar_refcount
static struct mxser_struct mxvar_table [MXSER_PORTS]
static struct tty_struct * mxvar_tty [MXSER_PORTS+1]
static struct termiosmxvar_termios [MXSER_PORTS+1]
static struct termiosmxvar_termios_locked [MXSER_PORTS+1]
static struct mxser_log mxvar_log
static int mxvar_diagflag
static unsigned char * mxvar_tmp_buf = 0
static struct semaphore mxvar_tmp_buf_sem = MUTEX
static int mxvar_baud_table []
mxser_hwconf mxsercfg [MXSER_BOARDS]


Define Documentation

#define B921600   (B460800 +1)
 

#define C104_ASIC_ID   2
 

Definition at line 119 of file mxser.c.

Referenced by mxser_get_ISA_conf(), and mxser_program_mode().

#define C168_ASIC_ID   1
 

Definition at line 118 of file mxser.c.

Referenced by mxser_get_ISA_conf(), and mxser_program_mode().

#define CHIP_CS   0x04
 

Definition at line 2354 of file mxser.c.

Referenced by mxser_read_register().

#define CHIP_DI   0x08
 

Definition at line 2355 of file mxser.c.

Referenced by mxser_read_register().

#define CHIP_DO   0x02
 

Definition at line 2353 of file mxser.c.

Referenced by mxser_read_register().

#define CHIP_SK   0x01
 

Definition at line 2352 of file mxser.c.

Referenced by mxser_read_register().

#define CI104J_ASIC_ID   5
 

Definition at line 120 of file mxser.c.

Referenced by mxser_get_ISA_conf(), and mxser_program_mode().

#define EN0_DCFG   0x00E
 

Definition at line 2361 of file mxser.c.

Referenced by __initfunc(), and NS8390_init().

#define EN0_PORT   0x010
 

Definition at line 2362 of file mxser.c.

#define EN0_RCNTHI   0x00B
 

Definition at line 2360 of file mxser.c.

Referenced by __initfunc(), ei_rx_overrun(), etherh_block_input(), etherh_block_output(), etherh_get_header(), etherh_getifstat(), etherh_setif(), hp_block_input(), hp_block_output(), hp_get_8390_hdr(), ne2k_pci_block_input(), ne2k_pci_block_output(), ne2k_pci_get_8390_hdr(), ne_block_input(), ne_block_output(), ne_get_8390_hdr(), and NS8390_init().

#define EN0_RCNTLO   0x00A
 

Definition at line 2359 of file mxser.c.

Referenced by __initfunc(), ei_rx_overrun(), etherh_block_input(), etherh_block_output(), etherh_get_header(), hp_block_input(), hp_block_output(), hp_get_8390_hdr(), ne2k_pci_block_input(), ne2k_pci_block_output(), ne2k_pci_get_8390_hdr(), ne_block_input(), ne_block_output(), ne_get_8390_hdr(), and NS8390_init().

#define EN0_RSARHI   0x009
 

Definition at line 2358 of file mxser.c.

Referenced by __initfunc(), etherh_block_input(), etherh_block_output(), etherh_get_header(), hp_block_input(), hp_block_output(), hp_get_8390_hdr(), ne2k_pci_block_input(), ne2k_pci_block_output(), ne2k_pci_get_8390_hdr(), ne_block_input(), ne_block_output(), and ne_get_8390_hdr().

#define EN0_RSARLO   0x008
 

Definition at line 2357 of file mxser.c.

Referenced by __initfunc(), etherh_block_input(), etherh_block_output(), etherh_get_header(), hp_block_input(), hp_block_output(), hp_get_8390_hdr(), ne2k_pci_block_input(), ne2k_pci_block_output(), ne2k_pci_get_8390_hdr(), ne_block_input(), ne_block_output(), and ne_get_8390_hdr().

#define EN_CCMD   0x000
 

Definition at line 2356 of file mxser.c.

#define ENC_PAGE0   0x000
 

Definition at line 2363 of file mxser.c.

#define ENC_PAGE3   0x0C0
 

Definition at line 2364 of file mxser.c.

#define IRQ_T info   )     ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)
 

Definition at line 98 of file mxser.c.

#define MIN a,
 )     ((a) < (b) ? (a) : (b))
 

Definition at line 101 of file mxser.c.

#define MOXA   0x400
 

Definition at line 151 of file mxser.c.

#define MOXA_CHKPORTENABLE   (MOXA + 60)
 

Definition at line 155 of file mxser.c.

Referenced by mxser_ioctl_special().

#define MOXA_DIAGNOSE   (MOXA + 50)
 

Definition at line 154 of file mxser.c.

#define MOXA_GET_CONF   (MOXA + 35)
 

Definition at line 153 of file mxser.c.

#define MOXA_GET_CUMAJOR   (MOXA + 64)
 

Definition at line 158 of file mxser.c.

#define MOXA_GET_MAJOR   (MOXA + 63)
 

Definition at line 157 of file mxser.c.

#define MOXA_GETDATACOUNT   (MOXA + 23)
 

Definition at line 152 of file mxser.c.

#define MOXA_GETMSTATUS   (MOXA + 65)
 

Definition at line 159 of file mxser.c.

#define MOXA_HighSpeedOn   (MOXA + 61)
 

Definition at line 156 of file mxser.c.

Referenced by mxser_ioctl().

#define MXSER_BOARDS   4
 

Definition at line 76 of file mxser.c.

#define MXSER_ERR_IOADDR   -1
 

Definition at line 81 of file mxser.c.

Referenced by mxser_get_PCI_conf(), and mxser_init().

#define MXSER_ERR_IRQ   -2
 

Definition at line 82 of file mxser.c.

Referenced by mxser_get_ISA_conf(), mxser_get_PCI_conf(), and mxser_init().

#define MXSER_ERR_IRQ_CONFLIT   -3
 

Definition at line 83 of file mxser.c.

Referenced by mxser_get_ISA_conf(), and mxser_init().

#define MXSER_ERR_VECTOR   -4
 

Definition at line 84 of file mxser.c.

Referenced by mxser_get_ISA_conf(), mxser_get_PCI_conf(), and mxser_init().

#define MXSER_EVENT_HANGUP   2
 

Definition at line 71 of file mxser.c.

Referenced by mxser_check_modem_status(), and mxser_do_softint().

#define MXSER_EVENT_TXLOW   1
 

Definition at line 70 of file mxser.c.

Referenced by mxser_check_modem_status(), mxser_do_softint(), and mxser_transmit_chars().

#define MXSER_ISR_PASS_LIMIT   256
 

Definition at line 79 of file mxser.c.

Referenced by mxser_interrupt().

#define MXSER_PORTS   32
 

Definition at line 77 of file mxser.c.

#define MXSER_PORTS_PER_BOARD   8
 

Definition at line 78 of file mxser.c.

Referenced by mxser_init(), mxser_initbrd(), and mxser_interrupt().

#define MXSER_VERSION   "1.1kern"
 

Definition at line 64 of file mxser.c.

Referenced by mxser_init().

#define MXSERCUMAJOR   175
 

Definition at line 67 of file mxser.c.

#define MXSERMAJOR   174
 

Definition at line 66 of file mxser.c.

#define PCI_DEVICE_ID_C104   0x1040
 

Definition at line 115 of file mxser.c.

#define PCI_DEVICE_ID_C168   0x1680
 

Definition at line 112 of file mxser.c.

#define PCI_VENDOR_ID_MOXA   0x1393
 

Definition at line 109 of file mxser.c.

#define PORTNO x   )     (MINOR((x)->device) - (x)->driver.minor_start)
 

Definition at line 94 of file mxser.c.

#define RELEVANT_IFLAG iflag   )     (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
 

Definition at line 96 of file mxser.c.

#define SERIAL_DO_RESTART
 

Definition at line 74 of file mxser.c.

#define SERIAL_TYPE_CALLOUT   2
 

Definition at line 87 of file mxser.c.

#define SERIAL_TYPE_NORMAL   1
 

Definition at line 86 of file mxser.c.

#define UART_LSR_SPECIAL   0x1E
 

Definition at line 92 of file mxser.c.

Referenced by mxser_receive_chars().

#define UART_MCR_AFE   0x20
 

Definition at line 91 of file mxser.c.

Referenced by mxser_change_speed().

#define WAKEUP_CHARS   256
 

Definition at line 89 of file mxser.c.


Typedef Documentation

typedef struct _moxa_pci_info moxa_pci_info
 


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
MXSER_BOARD_C168_ISA 
MXSER_BOARD_C104_ISA 
MXSER_BOARD_CI104J 
MXSER_BOARD_C168_PCI 
MXSER_BOARD_C104_PCI 

Definition at line 122 of file mxser.c.


Function Documentation

static int mxser_block_til_ready struct tty_struct *  ,
struct file ,
struct mxser_struct
[static]
 

Definition at line 1532 of file mxser.c.

References ASYNC_CALLOUT_ACTIVE, ASYNC_CLOSING, ASYNC_HUP_NOTIFY, ASYNC_INITIALIZED, ASYNC_NORMAL_ACTIVE, ASYNC_PGRP_LOCKOUT, ASYNC_SESSION_LOCKOUT, mxser_struct::base, mxser_struct::blocked_open, termios::c_cflag, cli, CLOCAL, mxser_struct::close_wait, mxser_struct::count, current, EAGAIN, EBUSY, ERESTARTSYS, mxser_struct::flags, inb, interruptible_sleep_on(), mxser_struct::normal_termios, NULL, O_NONBLOCK, mxser_struct::open_wait, outb, mxser_struct::pgrp, restore_flags, save_flags, schedule(), SERIAL_TYPE_CALLOUT, mxser_struct::session, signal_pending, TASK_INTERRUPTIBLE, TASK_RUNNING, tty_hung_up_p(), UART_MCR, UART_MCR_DTR, UART_MCR_RTS, UART_MSR, and UART_MSR_DCD.

Referenced by mxser_open().

Here is the call graph for this function:

static int mxser_change_speed struct mxser_struct ,
struct termios old_termios
[static]
 

Definition at line 1793 of file mxser.c.

References ASYNC_CHECK_CD, ASYNC_CTS_FLOW, ASYNC_SPD_HI, ASYNC_SPD_MASK, ASYNC_SPD_SHI, ASYNC_SPD_VHI, ASYNC_SPD_WARP, B110, B115200, B1200, B134, B150, B1800, B19200, B200, B230400, B2400, B300, B38400, B460800, B4800, B50, B57600, B600, B75, B921600, B9600, mxser_struct::base, mxser_struct::baud_base, termios::c_cflag, CBAUD, CBAUDEX, cli, CLOCAL, CRTSCTS, CS5, CS6, CS7, CS8, CSIZE, CSTOPB, mxser_struct::flags, mxser_struct::IER, mxser_struct::ignore_status_mask, mxser_struct::MCR, mxvar_baud_table, outb, PARENB, PARODD, PORT_16450, PORT_16550A, PORT_8250, mxser_struct::read_status_mask, restore_flags, mxser_struct::rx_trigger, save_flags, mxser_struct::tty, mxser_struct::type, UART_DLL, UART_DLM, UART_FCR, UART_FCR_ENABLE_FIFO, UART_FCR_TRIGGER_1, UART_FCR_TRIGGER_14, UART_FCR_TRIGGER_4, UART_FCR_TRIGGER_8, UART_IER, UART_IER_MSI, UART_LCR, UART_LCR_DLAB, UART_LCR_EPAR, UART_LCR_PARITY, UART_LSR_BI, UART_LSR_DR, UART_LSR_FE, UART_LSR_OE, UART_LSR_PE, UART_LSR_THRE, UART_MCR, UART_MCR_AFE, UART_MCR_DTR, and xff.

Referenced by mxser_open(), mxser_set_serial_info(), mxser_set_termios(), and mxser_startup().

static int mxser_chars_in_buffer struct tty_struct *   )  [static]
 

Definition at line 998 of file mxser.c.

References mxser_struct::xmit_cnt.

Referenced by mxser_init().

static void mxser_check_modem_status struct mxser_struct ,
int 
[inline, static]
 

Definition at line 1488 of file mxser.c.

References ASYNC_CALLOUT_ACTIVE, ASYNC_CALLOUT_NOHUP, ASYNC_CHECK_CD, ASYNC_CTS_FLOW, mxser_struct::base, async_icount::cts, async_icount::dcd, mxser_struct::delta_msr_wait, async_icount::dsr, mxser_struct::event, mxser_struct::flags, mxser_struct::icount, mxser_struct::IER, MXSER_EVENT_HANGUP, MXSER_EVENT_TXLOW, mxser_struct::open_wait, outb, queue_task, async_icount::rng, set_bit, tq_scheduler, mxser_struct::tqueue, mxser_struct::tty, UART_IER, UART_IER_THRI, UART_MSR_CTS, UART_MSR_DCD, UART_MSR_DCTS, UART_MSR_DDCD, UART_MSR_DDSR, and UART_MSR_TERI.

Referenced by mxser_get_modem_info(), and mxser_interrupt().

static void mxser_close struct tty_struct *  ,
struct file
[static]
 

Definition at line 794 of file mxser.c.

References ASYNC_CALLOUT_ACTIVE, ASYNC_CLOSING, ASYNC_CLOSING_WAIT_NONE, ASYNC_INITIALIZED, ASYNC_NORMAL_ACTIVE, mxser_struct::base, mxser_struct::callout_termios, cli, mxser_struct::closing_wait, mxser_struct::count, current, mxser_struct::flags, HZ, mxser_struct::IER, inb, jiffies, MOD_DEC_USE_COUNT, mxser_shutdown(), mxser_struct::normal_termios, outb, mxser_struct::port, PORTNO, printk, restore_flags, save_flags, schedule_timeout, TASK_INTERRUPTIBLE, timeout, tty_hung_up_p(), tty_wait_until_sent(), UART_IER, UART_IER_RLSI, UART_LSR, and UART_LSR_TEMT.

Referenced by mxser_init().

Here is the call graph for this function:

static void mxser_do_softint void *   )  [static]
 

Definition at line 706 of file mxser.c.

References mxser_struct::event, MXSER_EVENT_HANGUP, MXSER_EVENT_TXLOW, test_and_clear_bit, mxser_struct::tty, tty, and tty_hangup().

Referenced by mxser_initbrd().

Here is the call graph for this function:

static void mxser_flush_buffer struct tty_struct *   )  [static]
 

Definition at line 1005 of file mxser.c.

References cli, restore_flags, save_flags, mxser_struct::xmit_cnt, mxser_struct::xmit_head, and mxser_struct::xmit_tail.

Referenced by mxser_hangup(), and mxser_init().

static void mxser_flush_chars struct tty_struct *   )  [static]
 

Definition at line 971 of file mxser.c.

References mxser_struct::base, cli, mxser_struct::IER, outb, restore_flags, save_flags, UART_IER, UART_IER_THRI, mxser_struct::xmit_buf, and mxser_struct::xmit_cnt.

Referenced by mxser_init().

static int mxser_get_ISA_conf int  ,
struct mxser_hwconf
[static]
 

Definition at line 2294 of file mxser.c.

References mxser_hwconf::baud_base, mxser_hwconf::board_type, C104_ASIC_ID, C168_ASIC_ID, CI104J_ASIC_ID, id, inb, mxser_hwconf::ioaddr, mxser_hwconf::irq, irq, MXSER_BOARD_C104_ISA, MXSER_BOARD_C168_ISA, MXSER_BOARD_CI104J, MXSER_ERR_IRQ, MXSER_ERR_IRQ_CONFLIT, MXSER_ERR_VECTOR, mxser_read_register(), outb, PORT_16450, PORT_16550A, mxser_hwconf::ports, UART_EFR, UART_FCR, UART_FCR_ENABLE_FIFO, UART_IIR, UART_LCR, UART_LCR_DLAB, mxser_hwconf::uart_type, mxser_hwconf::vector, mxser_hwconf::vector_mask, and x80.

Referenced by mxser_init().

Here is the call graph for this function:

static int mxser_get_lsr_info struct mxser_struct ,
unsigned int * 
[static]
 

Definition at line 2198 of file mxser.c.

References cli, inb, put_user, restore_flags, result, save_flags, status, TIOCSER_TEMT, UART_LSR, and UART_LSR_TEMT.

Referenced by mxser_ioctl().

static int mxser_get_modem_info struct mxser_struct ,
unsigned int * 
[static]
 

Definition at line 2230 of file mxser.c.

References mxser_struct::base, cli, inb, mxser_struct::MCR, mxser_check_modem_status(), put_user, restore_flags, result, save_flags, status, TIOCM_CAR, TIOCM_CTS, TIOCM_DSR, TIOCM_DTR, TIOCM_RNG, TIOCM_RTS, UART_MCR_DTR, UART_MCR_RTS, UART_MSR, UART_MSR_ANY_DELTA, UART_MSR_CTS, UART_MSR_DCD, UART_MSR_DSR, and UART_MSR_RI.

Referenced by mxser_ioctl().

Here is the call graph for this function:

static int mxser_get_PCI_conf int  ,
int  ,
int  ,
struct mxser_hwconf
[static]
 

Definition at line 455 of file mxser.c.

References mxser_hwconf::baud_base, mxser_hwconf::board_type, mxser_hwconf::ioaddr, mxser_hwconf::irq, MXSER_ERR_IOADDR, MXSER_ERR_IRQ, MXSER_ERR_VECTOR, mxser_numports, PCI_BASE_ADDRESS_2, PCI_BASE_ADDRESS_3, PCI_INTERRUPT_LINE, pcibios_read_config_dword(), PORT_16550A, ports, mxser_hwconf::ports, mxser_hwconf::uart_type, val, mxser_hwconf::vector, mxser_hwconf::vector_mask, and xffffffff.

Referenced by mxser_init().

Here is the call graph for this function:

static int mxser_get_serial_info struct mxser_struct ,
struct serial_struct
[static]
 

Definition at line 2118 of file mxser.c.

References mxser_struct::base, mxser_struct::baud_base, mxser_struct::close_delay, mxser_struct::closing_wait, copy_to_user, mxser_struct::custom_divisor, EFAULT, mxser_struct::flags, mxser_struct::irq, memset, mxser_struct::port, and mxser_struct::type.

Referenced by mxser_ioctl().

static void mxser_getcfg int  board,
struct mxser_hwconf hwconf
[static]
 

Definition at line 450 of file mxser.c.

Referenced by mxser_init().

void mxser_hangup struct tty_struct *   )  [static]
 

Definition at line 1337 of file mxser.c.

References ASYNC_CALLOUT_ACTIVE, ASYNC_NORMAL_ACTIVE, mxser_struct::count, mxser_struct::event, mxser_struct::flags, mxser_flush_buffer(), mxser_shutdown(), mxser_struct::open_wait, and mxser_struct::tty.

Referenced by mxser_init().

Here is the call graph for this function:

int mxser_init void   ) 
 

Definition at line 492 of file mxser.c.

References b, B9600, mxser_hwconf::board_type, _moxa_pci_info::busNum, termios::c_cflag, calloutmajor, tty_driver::chars_in_buffer, CLOCAL, tty_driver::close, CREAD, CS8, device_id, _moxa_pci_info::devNum, tty_driver::flags, tty_driver::flush_buffer, tty_driver::flush_chars, free_irq(), tty_driver::hangup, HUPCL, index, tty_driver::init_termios, ioaddr, tty_driver::ioctl, irq, m, tty_driver::magic, tty_driver::major, memset, tty_driver::minor_start, mxser_brdname, mxser_chars_in_buffer(), mxser_close(), MXSER_ERR_IOADDR, MXSER_ERR_IRQ, MXSER_ERR_IRQ_CONFLIT, MXSER_ERR_VECTOR,