Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

isicom: restore using hardware break support

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
6d889724 dcbf1280

+10 -22
+1 -1
drivers/char/Kconfig
··· 218 218 219 219 config ISI 220 220 tristate "Multi-Tech multiport card support (EXPERIMENTAL)" 221 - depends on SERIAL_NONSTANDARD && PCI && BROKEN 221 + depends on SERIAL_NONSTANDARD && PCI 222 222 select FW_LOADER 223 223 help 224 224 This is a driver for the Multi-Tech cards which provide several
+9 -21
drivers/char/isicom.c
··· 1181 1181 } 1182 1182 1183 1183 /* ioctl et all */ 1184 - static inline void isicom_send_break(struct isi_port *port, 1185 - unsigned long length) 1184 + static int isicom_send_break(struct tty_struct *tty, int length) 1186 1185 { 1186 + struct isi_port *port = tty->driver_data; 1187 1187 struct isi_board *card = port->card; 1188 1188 unsigned long base = card->base; 1189 1189 1190 + if (length == -1) 1191 + return -EOPNOTSUPP; 1192 + 1190 1193 if (!lock_card(card)) 1191 - return; 1194 + return -EINVAL; 1192 1195 1193 1196 outw(0x8000 | ((port->channel) << (card->shift_count)) | 0x3, base); 1194 1197 outw((length & 0xff) << 8 | 0x00, base); ··· 1199 1196 InterruptTheCard(base); 1200 1197 1201 1198 unlock_card(card); 1199 + return 0; 1202 1200 } 1203 1201 1204 1202 static int isicom_tiocmget(struct tty_struct *tty, struct file *file) ··· 1309 1305 { 1310 1306 struct isi_port *port = tty->driver_data; 1311 1307 void __user *argp = (void __user *)arg; 1312 - int retval; 1313 1308 1314 1309 if (isicom_paranoia_check(port, tty->name, "isicom_ioctl")) 1315 1310 return -ENODEV; 1316 1311 1317 1312 switch (cmd) { 1318 - case TCSBRK: 1319 - retval = tty_check_change(tty); 1320 - if (retval) 1321 - return retval; 1322 - tty_wait_until_sent(tty, 0); 1323 - if (!arg) 1324 - isicom_send_break(port, HZ/4); 1325 - return 0; 1326 - 1327 - case TCSBRKP: 1328 - retval = tty_check_change(tty); 1329 - if (retval) 1330 - return retval; 1331 - tty_wait_until_sent(tty, 0); 1332 - isicom_send_break(port, arg ? arg * (HZ/10) : HZ/4); 1333 - return 0; 1334 1313 case TIOCGSERIAL: 1335 1314 return isicom_get_serial_info(port, argp); 1336 1315 ··· 1446 1459 .flush_buffer = isicom_flush_buffer, 1447 1460 .tiocmget = isicom_tiocmget, 1448 1461 .tiocmset = isicom_tiocmset, 1462 + .break_ctl = isicom_send_break, 1449 1463 }; 1450 1464 1451 1465 static int __devinit reset_card(struct pci_dev *pdev, ··· 1820 1832 isicom_normal->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | 1821 1833 CLOCAL; 1822 1834 isicom_normal->flags = TTY_DRIVER_REAL_RAW | 1823 - TTY_DRIVER_DYNAMIC_DEV; 1835 + TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_HARDWARE_BREAK; 1824 1836 tty_set_operations(isicom_normal, &isicom_ops); 1825 1837 1826 1838 retval = tty_register_driver(isicom_normal);