diff options
Diffstat (limited to 'drivers/char/mxser.c')
-rw-r--r-- | drivers/char/mxser.c | 49 |
1 files changed, 8 insertions, 41 deletions
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 6307e301bd26..4c756bbba948 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | #include "mxser.h" | 48 | #include "mxser.h" |
49 | 49 | ||
50 | #define MXSER_VERSION "2.0.3" /* 1.11 */ | 50 | #define MXSER_VERSION "2.0.4" /* 1.12 */ |
51 | #define MXSERMAJOR 174 | 51 | #define MXSERMAJOR 174 |
52 | #define MXSERCUMAJOR 175 | 52 | #define MXSERCUMAJOR 175 |
53 | 53 | ||
@@ -71,12 +71,13 @@ | |||
71 | #define UART_MCR_AFE 0x20 | 71 | #define UART_MCR_AFE 0x20 |
72 | #define UART_LSR_SPECIAL 0x1E | 72 | #define UART_LSR_SPECIAL 0x1E |
73 | 73 | ||
74 | #define PCI_DEVICE_ID_POS104UL 0x1044 | ||
74 | #define PCI_DEVICE_ID_CB108 0x1080 | 75 | #define PCI_DEVICE_ID_CB108 0x1080 |
76 | #define PCI_DEVICE_ID_CP102UF 0x1023 | ||
75 | #define PCI_DEVICE_ID_CB114 0x1142 | 77 | #define PCI_DEVICE_ID_CB114 0x1142 |
76 | #define PCI_DEVICE_ID_CP114UL 0x1143 | 78 | #define PCI_DEVICE_ID_CP114UL 0x1143 |
77 | #define PCI_DEVICE_ID_CB134I 0x1341 | 79 | #define PCI_DEVICE_ID_CB134I 0x1341 |
78 | #define PCI_DEVICE_ID_CP138U 0x1380 | 80 | #define PCI_DEVICE_ID_CP138U 0x1380 |
79 | #define PCI_DEVICE_ID_POS104UL 0x1044 | ||
80 | 81 | ||
81 | 82 | ||
82 | #define C168_ASIC_ID 1 | 83 | #define C168_ASIC_ID 1 |
@@ -142,7 +143,8 @@ static const struct mxser_cardinfo mxser_cards[] = { | |||
142 | { "CB-134I series", 4, }, | 143 | { "CB-134I series", 4, }, |
143 | { "CP-138U series", 8, }, | 144 | { "CP-138U series", 8, }, |
144 | { "POS-104UL series", 4, }, | 145 | { "POS-104UL series", 4, }, |
145 | { "CP-114UL series", 4, } | 146 | { "CP-114UL series", 4, }, |
147 | /*30*/ { "CP-102UF series", 2, } | ||
146 | }; | 148 | }; |
147 | 149 | ||
148 | /* driver_data correspond to the lines in the structure above | 150 | /* driver_data correspond to the lines in the structure above |
@@ -172,6 +174,7 @@ static struct pci_device_id mxser_pcibrds[] = { | |||
172 | { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP138U), .driver_data = 27 }, | 174 | { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP138U), .driver_data = 27 }, |
173 | { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_POS104UL), .driver_data = 28 }, | 175 | { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_POS104UL), .driver_data = 28 }, |
174 | { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP114UL), .driver_data = 29 }, | 176 | { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP114UL), .driver_data = 29 }, |
177 | { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP102UF), .driver_data = 30 }, | ||
175 | { } | 178 | { } |
176 | }; | 179 | }; |
177 | MODULE_DEVICE_TABLE(pci, mxser_pcibrds); | 180 | MODULE_DEVICE_TABLE(pci, mxser_pcibrds); |
@@ -1414,7 +1417,6 @@ static int mxser_set_serial_info(struct mxser_port *info, | |||
1414 | info->port.closing_wait = new_serial.closing_wait * HZ / 100; | 1417 | info->port.closing_wait = new_serial.closing_wait * HZ / 100; |
1415 | info->port.tty->low_latency = | 1418 | info->port.tty->low_latency = |
1416 | (info->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0; | 1419 | (info->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0; |
1417 | info->port.tty->low_latency = 0; | ||
1418 | if ((info->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST && | 1420 | if ((info->port.flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST && |
1419 | (new_serial.baud_base != info->baud_base || | 1421 | (new_serial.baud_base != info->baud_base || |
1420 | new_serial.custom_divisor != | 1422 | new_serial.custom_divisor != |
@@ -1464,27 +1466,6 @@ static int mxser_get_lsr_info(struct mxser_port *info, | |||
1464 | return put_user(result, value); | 1466 | return put_user(result, value); |
1465 | } | 1467 | } |
1466 | 1468 | ||
1467 | /* | ||
1468 | * This routine sends a break character out the serial port. | ||
1469 | */ | ||
1470 | static void mxser_send_break(struct mxser_port *info, int duration) | ||
1471 | { | ||
1472 | unsigned long flags; | ||
1473 | |||
1474 | if (!info->ioaddr) | ||
1475 | return; | ||
1476 | set_current_state(TASK_INTERRUPTIBLE); | ||
1477 | spin_lock_irqsave(&info->slock, flags); | ||
1478 | outb(inb(info->ioaddr + UART_LCR) | UART_LCR_SBC, | ||
1479 | info->ioaddr + UART_LCR); | ||
1480 | spin_unlock_irqrestore(&info->slock, flags); | ||
1481 | schedule_timeout(duration); | ||
1482 | spin_lock_irqsave(&info->slock, flags); | ||
1483 | outb(inb(info->ioaddr + UART_LCR) & ~UART_LCR_SBC, | ||
1484 | info->ioaddr + UART_LCR); | ||
1485 | spin_unlock_irqrestore(&info->slock, flags); | ||
1486 | } | ||
1487 | |||
1488 | static int mxser_tiocmget(struct tty_struct *tty, struct file *file) | 1469 | static int mxser_tiocmget(struct tty_struct *tty, struct file *file) |
1489 | { | 1470 | { |
1490 | struct mxser_port *info = tty->driver_data; | 1471 | struct mxser_port *info = tty->driver_data; |
@@ -1872,21 +1853,6 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, | |||
1872 | return -EIO; | 1853 | return -EIO; |
1873 | 1854 | ||
1874 | switch (cmd) { | 1855 | switch (cmd) { |
1875 | case TCSBRK: /* SVID version: non-zero arg --> no break */ | ||
1876 | retval = tty_check_change(tty); | ||
1877 | if (retval) | ||
1878 | return retval; | ||
1879 | tty_wait_until_sent(tty, 0); | ||
1880 | if (!arg) | ||
1881 | mxser_send_break(info, HZ / 4); /* 1/4 second */ | ||
1882 | return 0; | ||
1883 | case TCSBRKP: /* support for POSIX tcsendbreak() */ | ||
1884 | retval = tty_check_change(tty); | ||
1885 | if (retval) | ||
1886 | return retval; | ||
1887 | tty_wait_until_sent(tty, 0); | ||
1888 | mxser_send_break(info, arg ? arg * (HZ / 10) : HZ / 4); | ||
1889 | return 0; | ||
1890 | case TIOCGSERIAL: | 1856 | case TIOCGSERIAL: |
1891 | lock_kernel(); | 1857 | lock_kernel(); |
1892 | retval = mxser_get_serial_info(info, argp); | 1858 | retval = mxser_get_serial_info(info, argp); |
@@ -2219,7 +2185,7 @@ static void mxser_hangup(struct tty_struct *tty) | |||
2219 | /* | 2185 | /* |
2220 | * mxser_rs_break() --- routine which turns the break handling on or off | 2186 | * mxser_rs_break() --- routine which turns the break handling on or off |
2221 | */ | 2187 | */ |
2222 | static void mxser_rs_break(struct tty_struct *tty, int break_state) | 2188 | static int mxser_rs_break(struct tty_struct *tty, int break_state) |
2223 | { | 2189 | { |
2224 | struct mxser_port *info = tty->driver_data; | 2190 | struct mxser_port *info = tty->driver_data; |
2225 | unsigned long flags; | 2191 | unsigned long flags; |
@@ -2232,6 +2198,7 @@ static void mxser_rs_break(struct tty_struct *tty, int break_state) | |||
2232 | outb(inb(info->ioaddr + UART_LCR) & ~UART_LCR_SBC, | 2198 | outb(inb(info->ioaddr + UART_LCR) & ~UART_LCR_SBC, |
2233 | info->ioaddr + UART_LCR); | 2199 | info->ioaddr + UART_LCR); |
2234 | spin_unlock_irqrestore(&info->slock, flags); | 2200 | spin_unlock_irqrestore(&info->slock, flags); |
2201 | return 0; | ||
2235 | } | 2202 | } |
2236 | 2203 | ||
2237 | static void mxser_receive_chars(struct mxser_port *port, int *status) | 2204 | static void mxser_receive_chars(struct mxser_port *port, int *status) |