From: Paul M. <le...@us...> - 2001-08-25 02:19:32
|
Update of /cvsroot/linux-mips/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv13548/drivers/char Modified Files: Config.in Makefile dz.c mem.c serial.c serial_tx3912.c tty_io.c Log Message: Sync to 2.4.7 Index: Config.in =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/Config.in,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Config.in 2001/08/10 18:21:24 1.4 --- Config.in 2001/08/25 02:19:27 1.5 *************** *** 43,48 **** dep_tristate ' Multi-Tech multiport card support (EXPERIMENTAL)' CONFIG_ISI m fi ! dep_tristate ' Microgate SyncLink card support' CONFIG_SYNCLINK m ! dep_tristate ' HDLC line discipline support' CONFIG_N_HDLC m tristate ' SDL RISCom/8 card support' CONFIG_RISCOM8 tristate ' Specialix IO8+ card support' CONFIG_SPECIALIX --- 43,48 ---- dep_tristate ' Multi-Tech multiport card support (EXPERIMENTAL)' CONFIG_ISI m fi ! tristate ' Microgate SyncLink card support' CONFIG_SYNCLINK ! tristate ' HDLC line discipline support' CONFIG_N_HDLC tristate ' SDL RISCom/8 card support' CONFIG_RISCOM8 tristate ' Specialix IO8+ card support' CONFIG_SPECIALIX *************** *** 77,80 **** --- 77,83 ---- bool 'Enable Smart Card Reader 1 Support ' CONFIG_IT8172_SCR1 fi + if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_ZORRO" = "y" ]; then + tristate 'Commodore A2232 serial support (EXPERIMENTAL)' CONFIG_A2232 + fi if [ "$CONFIG_FOOTBRIDGE" = "y" ]; then bool 'DC21285 serial port support' CONFIG_SERIAL_21285 *************** *** 152,155 **** --- 155,159 ---- tristate ' Advantech SBC Watchdog Timer' CONFIG_ADVANTECH_WDT tristate ' SBC-60XX Watchdog Timer' CONFIG_60XX_WDT + tristate ' W83877F (EMACS) Watchdog Timer' CONFIG_W83877F_WDT tristate ' Mixcom Watchdog' CONFIG_MIXCOMWD tristate ' Intel i810 TCO timer / Watchdog' CONFIG_I810_TCO *************** *** 186,189 **** --- 190,196 ---- tristate 'Siemens R3964 line discipline' CONFIG_R3964 tristate 'Applicom intelligent fieldbus card support' CONFIG_APPLICOM + if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then + tristate 'Sony Vaio Programmable I/O Control Device support' CONFIG_SONYPI $CONFIG_PCI + fi mainmenu_option next_comment Index: Makefile =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile 2001/08/18 22:37:12 1.6 --- Makefile 2001/08/25 02:19:27 1.7 *************** *** 24,28 **** export-objs := busmouse.o console.o keyboard.o sysrq.o \ misc.o pty.o random.o selection.o serial.o \ ! tty_io.o mod-subdirs := joystick ftape drm pcmcia --- 24,28 ---- export-objs := busmouse.o console.o keyboard.o sysrq.o \ misc.o pty.o random.o selection.o serial.o \ ! sonypi.o tty_io.o tty_ioctl.o mod-subdirs := joystick ftape drm pcmcia *************** *** 55,58 **** --- 55,72 ---- endif + ifeq ($(ARCH),s390) + KEYMAP = + KEYBD = + CONSOLE = + SERIAL = + endif + + ifeq ($(ARCH),s390x) + KEYMAP = + KEYBD = + CONSOLE = + SERIAL = + endif + ifeq ($(ARCH),m68k) ifdef CONFIG_AMIGA *************** *** 160,163 **** --- 174,178 ---- obj-$(CONFIG_SPECIALIX) += specialix.o obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o + obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o obj-$(CONFIG_SX) += sx.o generic_serial.o obj-$(CONFIG_RIO) += rio/rio.o generic_serial.o *************** *** 184,187 **** --- 199,203 ---- obj-$(CONFIG_R3964) += n_r3964.o obj-$(CONFIG_APPLICOM) += applicom.o + obj-$(CONFIG_SONYPI) += sonypi.o obj-$(CONFIG_MS_BUSMOUSE) += msbusmouse.o obj-$(CONFIG_82C710_MOUSE) += qpmouse.o Index: dz.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/dz.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dz.c 2001/08/10 16:02:10 1.2 --- dz.c 2001/08/25 02:19:27 1.3 *************** *** 15,18 **** --- 15,20 ---- * [09-JAN-99] triemer minor fix for schedule - due to removal of timeout * field from "current" - somewhere between 2.1.121 and 2.1.131 + Qua Jun 27 15:02:26 BRT 2001 + * [27-JUN-2001] Arnaldo Carvalho de Melo <ac...@co...> - cleanups * * Parts (C) 1999 David Airlie, ai...@li... *************** *** 882,886 **** tmp.closing_wait = info->closing_wait; ! return copy_to_user (retinfo, &tmp, sizeof(*retinfo)); } --- 884,888 ---- tmp.closing_wait = info->closing_wait; ! return copy_to_user(retinfo, &tmp, sizeof(*retinfo)) ? -EFAULT : 0; } *************** *** 1003,1009 **** case TIOCSSOFTCAR: ! error = get_user (arg, (unsigned long *)arg); ! if (error) ! return error; tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0); --- 1005,1011 ---- case TIOCSSOFTCAR: ! if (get_user (arg, (unsigned long *)arg)) ! return -EFAULT; ! tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0); *************** *** 1021,1039 **** case TIOCSERGETLSR: /* Get line status register */ ! error = verify_area(VERIFY_WRITE, (void *)arg, ! sizeof(unsigned int)); ! if (error) ! return error; ! else ! return get_lsr_info (info, (unsigned int *)arg); case TIOCSERGSTRUCT: ! error = verify_area(VERIFY_WRITE, (void *)arg, ! sizeof(struct dz_serial)); ! if (error) ! return error; ! copy_to_user((struct dz_serial *)arg, info, ! sizeof(struct dz_serial)); ! return 0; default: --- 1023,1031 ---- case TIOCSERGETLSR: /* Get line status register */ ! return get_lsr_info (info, (unsigned int *)arg); case TIOCSERGSTRUCT: ! return copy_to_user((struct dz_serial *)arg, info, ! sizeof(struct dz_serial)) ? -EFAULT : 0; default: *************** *** 1506,1510 **** * * dz_console_print is registered for printk. ! * The console_lock must be held when we get here. * ------------------------------------------------------------------- */ --- 1498,1502 ---- * * dz_console_print is registered for printk. ! * The console must be locked when we get here. * ------------------------------------------------------------------- */ Index: mem.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/mem.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** mem.c 2001/06/22 02:29:32 1.1.1.1 --- mem.c 2001/08/25 02:19:27 1.2 *************** *** 629,635 **** #endif tty_init(); - #ifdef CONFIG_PRINTER - lp_init(); - #endif #ifdef CONFIG_M68K_PRINTER lp_m68k_init(); --- 629,632 ---- Index: serial.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/serial.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** serial.c 2001/07/09 21:50:55 1.2 --- serial.c 2001/08/25 02:19:27 1.3 *************** *** 65,70 **** */ ! static char *serial_version = "5.05a"; ! static char *serial_revdate = "2001-03-20"; /* --- 65,70 ---- */ ! static char *serial_version = "5.05c"; [...1397 lines suppressed...] #ifdef SERIAL_DEBUG_PCI *************** *** 5179,5187 **** if (pnp_board->vendor) { - board.vendor = pnp_board->vendor; - board.device = pnp_board->device; /* Special case that's more efficient to hardcode */ ! if ((board.vendor == ISAPNP_VENDOR('A', 'K', 'Y') && ! board.device == ISAPNP_DEVICE(0x1021))) board.flags |= SPCI_FL_NO_SHIRQ; } else { --- 5307,5313 ---- if (pnp_board->vendor) { /* Special case that's more efficient to hardcode */ ! if ((pnp_board->vendor == ISAPNP_VENDOR('A', 'K', 'Y') && ! pnp_board->device == ISAPNP_DEVICE(0x1021))) board.flags |= SPCI_FL_NO_SHIRQ; } else { Index: serial_tx3912.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/serial_tx3912.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** serial_tx3912.c 2001/06/22 02:29:32 1.1.1.1 --- serial_tx3912.c 2001/08/25 02:19:27 1.2 *************** *** 74,87 **** /* - * FIXME: Redefines for IO macros in 'include/asm/io.h' - */ - //#define inb(addr) readb(addr) - //#define inw(addr) readw(addr) - //#define inl(addr) readl(addr) - //#define outb(b, addr) writeb(b, addr) - //#define outw(b, addr) writew(b, addr) - //#define outl(b, addr) writel(b, addr) - - /* * ---------------------------------------------------------------------- * --- 74,77 ---- Index: tty_io.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/char/tty_io.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tty_io.c 2001/08/22 18:18:14 1.4 --- tty_io.c 2001/08/25 02:19:27 1.5 *************** *** 214,220 **** { #ifdef TTY_PARANOIA_CHECK ! static const char *badmagic = "Warning: bad magic number for tty struct (%s) in %s\n"; ! static const char *badtty = "Warning: null TTY for (%s) in %s\n"; --- 214,220 ---- { #ifdef TTY_PARANOIA_CHECK ! static const char badmagic[] = KERN_WARNING "Warning: bad magic number for tty struct (%s) in %s\n"; ! static const char badtty[] = KERN_WARNING "Warning: null TTY for (%s) in %s\n"; *************** *** 248,252 **** count++; if (tty->count != count) { ! printk("Warning: dev (%s) tty->count(%d) != #fd's(%d) in %s\n", kdevname(tty->device), tty->count, count, routine); return count; --- 248,253 ---- count++; if (tty->count != count) { ! printk(KERN_WARNING "Warning: dev (%s) tty->count(%d) " ! "!= #fd's(%d) in %s\n", kdevname(tty->device), tty->count, count, routine); return count; *************** *** 359,363 **** return 0; if (tty->pgrp <= 0) { ! printk("tty_check_change: tty->pgrp <= 0!\n"); return 0; } --- 360,364 ---- return 0; if (tty->pgrp <= 0) { ! printk(KERN_WARNING "tty_check_change: tty->pgrp <= 0!\n"); return 0; } *************** *** 497,502 **** int i = (tty->ldisc.open)(tty); if (i < 0) ! printk("do_tty_hangup: N_TTY open: error %d\n", ! -i); } } --- 498,503 ---- int i = (tty->ldisc.open)(tty); if (i < 0) ! printk(KERN_ERR "do_tty_hangup: N_TTY open: " ! "error %d\n", -i); } } *************** *** 540,544 **** char buf[64]; ! printk("%s hangup...\n", tty_name(tty, buf)); #endif schedule_task(&tty->tq_hangup); --- 541,545 ---- char buf[64]; ! printk(KERN_DEBUG "%s hangup...\n", tty_name(tty, buf)); #endif schedule_task(&tty->tq_hangup); *************** *** 550,554 **** char buf[64]; ! printk("%s vhangup...\n", tty_name(tty, buf)); #endif do_tty_hangup((void *) tty); --- 551,555 ---- char buf[64]; ! printk(KERN_DEBUG "%s vhangup...\n", tty_name(tty, buf)); #endif do_tty_hangup((void *) tty); *************** *** 1002,1006 **** /* call the tty release_mem routine to clean out this slot */ release_mem_out: ! printk("init_dev: ldisc open failed, clearing slot %d\n", idx); release_mem(tty, idx); goto end_init; --- 1003,1008 ---- /* call the tty release_mem routine to clean out this slot */ release_mem_out: ! printk(KERN_INFO "init_dev: ldisc open failed, " ! "clearing slot %d\n", idx); release_mem(tty, idx); goto end_init; *************** *** 1025,1028 **** --- 1027,1031 ---- o_tty->magic = 0; (*o_tty->driver.refcount)--; + list_del(&o_tty->tty_files); free_tty_struct(o_tty); } *************** *** 1036,1039 **** --- 1039,1043 ---- tty->magic = 0; (*tty->driver.refcount)--; + list_del(&tty->tty_files); free_tty_struct(tty); } *************** *** 1069,1083 **** #ifdef TTY_PARANOIA_CHECK if (idx < 0 || idx >= tty->driver.num) { ! printk("release_dev: bad idx when trying to free (%s)\n", ! kdevname(tty->device)); return; } if (tty != tty->driver.table[idx]) { ! printk("release_dev: driver.table[%d] not tty for (%s)\n", ! idx, kdevname(tty->device)); return; } if (tty->termios != tty->driver.termios[idx]) { ! printk("release_dev: driver.termios[%d] not termios " "for (%s)\n", idx, kdevname(tty->device)); --- 1073,1087 ---- #ifdef TTY_PARANOIA_CHECK if (idx < 0 || idx >= tty->driver.num) { ! printk(KERN_DEBUG "release_dev: bad idx when trying to " ! "free (%s)\n", kdevname(tty->device)); return; } if (tty != tty->driver.table[idx]) { ! printk(KERN_DEBUG "release_dev: driver.table[%d] not tty " ! "for (%s)\n", idx, kdevname(tty->device)); return; } if (tty->termios != tty->driver.termios[idx]) { ! printk(KERN_DEBUG "release_dev: driver.termios[%d] not termios " "for (%s)\n", idx, kdevname(tty->device)); *************** *** 1085,1089 **** } if (tty->termios_locked != tty->driver.termios_locked[idx]) { ! printk("release_dev: driver.termios_locked[%d] not " "termios_locked for (%s)\n", idx, kdevname(tty->device)); --- 1089,1093 ---- } if (tty->termios_locked != tty->driver.termios_locked[idx]) { ! printk(KERN_DEBUG "release_dev: driver.termios_locked[%d] not " "termios_locked for (%s)\n", idx, kdevname(tty->device)); *************** *** 1093,1098 **** #ifdef TTY_DEBUG_HANGUP ! printk("release_dev of %s (tty count=%d)...", tty_name(tty, buf), ! tty->count); #endif --- 1097,1102 ---- #ifdef TTY_DEBUG_HANGUP ! printk(KERN_DEBUG "release_dev of %s (tty count=%d)...", ! tty_name(tty, buf), tty->count); #endif *************** *** 1100,1111 **** if (tty->driver.other) { if (o_tty != tty->driver.other->table[idx]) { ! printk("release_dev: other->table[%d] not o_tty for (" ! "%s)\n", idx, kdevname(tty->device)); return; } if (o_tty->termios != tty->driver.other->termios[idx]) { ! printk("release_dev: other->termios[%d] not o_termios " ! "for (%s)\n", idx, kdevname(tty->device)); return; --- 1104,1115 ---- if (tty->driver.other) { if (o_tty != tty->driver.other->table[idx]) { ! printk(KERN_DEBUG "release_dev: other->table[%d] " ! "not o_tty for (%s)\n", idx, kdevname(tty->device)); return; } if (o_tty->termios != tty->driver.other->termios[idx]) { ! printk(KERN_DEBUG "release_dev: other->termios[%d] " ! "not o_termios for (%s)\n", idx, kdevname(tty->device)); return; *************** *** 1113,1123 **** if (o_tty->termios_locked != tty->driver.other->termios_locked[idx]) { ! printk("release_dev: other->termios_locked[%d] not " ! "o_termios_locked for (%s)\n", idx, kdevname(tty->device)); return; } if (o_tty->link != tty) { ! printk("release_dev: bad pty pointers\n"); return; } --- 1117,1127 ---- if (o_tty->termios_locked != tty->driver.other->termios_locked[idx]) { ! printk(KERN_DEBUG "release_dev: other->termios_locked[" ! "%d] not o_termios_locked for (%s)\n", idx, kdevname(tty->device)); return; } if (o_tty->link != tty) { ! printk(KERN_DEBUG "release_dev: bad pty pointers\n"); return; } *************** *** 1174,1179 **** break; ! printk("release_dev: %s: read/write wait queue active!\n", ! tty_name(tty, buf)); schedule(); } --- 1178,1183 ---- break; ! printk(KERN_WARNING "release_dev: %s: read/write wait queue " ! "active!\n", tty_name(tty, buf)); schedule(); } *************** *** 1186,1190 **** if (pty_master) { if (--o_tty->count < 0) { ! printk("release_dev: bad pty slave count (%d) for %s\n", o_tty->count, tty_name(o_tty, buf)); o_tty->count = 0; --- 1190,1195 ---- if (pty_master) { if (--o_tty->count < 0) { ! printk(KERN_WARNING "release_dev: bad pty slave count " ! "(%d) for %s\n", o_tty->count, tty_name(o_tty, buf)); o_tty->count = 0; *************** *** 1192,1196 **** } if (--tty->count < 0) { ! printk("release_dev: bad tty->count (%d) for %s\n", tty->count, tty_name(tty, buf)); tty->count = 0; --- 1197,1201 ---- } if (--tty->count < 0) { ! printk(KERN_WARNING "release_dev: bad tty->count (%d) for %s\n", tty->count, tty_name(tty, buf)); tty->count = 0; *************** *** 1201,1205 **** * filp->private_data, to break the link between the tty and * the file descriptor. Otherwise if filp_close() blocks before ! * the the file descriptor is removed from the inuse_filp * list, check_tty_count() could observe a discrepancy and * printk a warning message to the user. --- 1206,1210 ---- * filp->private_data, to break the link between the tty and * the file descriptor. Otherwise if filp_close() blocks before ! * the file descriptor is removed from the inuse_filp * list, check_tty_count() could observe a discrepancy and * printk a warning message to the user. *************** *** 1243,1247 **** #ifdef TTY_DEBUG_HANGUP ! printk("freeing tty structure..."); #endif --- 1248,1252 ---- #ifdef TTY_DEBUG_HANGUP ! printk(KERN_DEBUG "freeing tty structure..."); #endif *************** *** 1371,1375 **** noctty = 1; #ifdef TTY_DEBUG_HANGUP ! printk("opening %s...", tty_name(tty, buf)); #endif if (tty->driver.open) --- 1376,1380 ---- noctty = 1; #ifdef TTY_DEBUG_HANGUP ! printk(KERN_DEBUG "opening %s...", tty_name(tty, buf)); #endif if (tty->driver.open) *************** *** 1384,1388 **** if (retval) { #ifdef TTY_DEBUG_HANGUP ! printk("error %d in opening %s...", retval, tty_name(tty, buf)); #endif --- 1389,1393 ---- if (retval) { #ifdef TTY_DEBUG_HANGUP ! printk(KERN_DEBUG "error %d in opening %s...", retval, tty_name(tty, buf)); #endif *************** *** 1608,1612 **** (real_tty->session != current->session)) return -ENOTTY; ! get_user(pgrp, (pid_t *) arg); if (pgrp < 0) return -EINVAL; --- 1613,1618 ---- (real_tty->session != current->session)) return -ENOTTY; ! if (get_user(pgrp, (pid_t *) arg)) ! return -EFAULT; if (pgrp < 0) return -EINVAL; *************** *** 1639,1647 **** static int tiocsetd(struct tty_struct *tty, int *arg) { ! int retval, ldisc; ! retval = get_user(ldisc, arg); ! if (retval) ! return retval; return tty_set_ldisc(tty, ldisc); } --- 1645,1652 ---- static int tiocsetd(struct tty_struct *tty, int *arg) { ! int ldisc; ! if (get_user(ldisc, arg)) ! return -EFAULT; return tty_set_ldisc(tty, ldisc); } *************** *** 1956,1960 **** if (i==15 && tty->alt_speed) { if (!tty->warned) { ! printk("Use of setserial/setrocket to set SPD_* flags is deprecated\n"); tty->warned = 1; } --- 1961,1966 ---- if (i==15 && tty->alt_speed) { if (!tty->warned) { ! printk(KERN_WARNING "Use of setserial/setrocket to " ! "set SPD_* flags is deprecated\n"); tty->warned = 1; } *************** *** 2375,2378 **** --- 2381,2387 ---- #ifdef CONFIG_HWC hwc_tty_init(); + #endif + #ifdef CONFIG_A2232 + a2232board_init(); #endif } |