The patch titled Char: sx, remove unneeded stuff has been removed from the -mm tree. Its filename was char-sx-remove-unneeded-stuff.patch This patch was dropped because it was nacked by the maintainer ------------------------------------------------------ Subject: Char: sx, remove unneeded stuff From: Jiri Slaby <jirislaby@xxxxxxxxx> remove #if 0's and commented code. We have version control for this purpose. Signed-off-by: Jiri Slaby <jirislaby@xxxxxxxxx> Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/char/sx.c | 132 -------------------------------------------- 1 file changed, 1 insertion(+), 131 deletions(-) diff -puN drivers/char/sx.c~char-sx-remove-unneeded-stuff drivers/char/sx.c --- a/drivers/char/sx.c~char-sx-remove-unneeded-stuff +++ a/drivers/char/sx.c @@ -252,29 +252,6 @@ /* Am I paranoid or not ? ;-) */ #undef SX_PARANOIA_CHECK -/* 20 -> 2000 per second. The card should rate-limit interrupts at 100 - Hz, but it is user configurable. I don't recommend going above 1000 - Hz. The interrupt ratelimit might trigger if the interrupt is - shared with a very active other device. */ -#define IRQ_RATE_LIMIT 20 - -/* Sharing interrupts is possible now. If the other device wants more - than 2000 interrupts per second, we'd gracefully decline further - interrupts. That's not what we want. On the other hand, if the - other device interrupts 2000 times a second, don't use the SX - interrupt. Use polling. */ -#undef IRQ_RATE_LIMIT - -#if 0 -/* Not implemented */ -/* - * The following defines are mostly for testing purposes. But if you need - * some nice reporting in your syslog, you can define them also. - */ -#define SX_REPORT_FIFO -#define SX_REPORT_OVERRUN -#endif - /* Function prototypes */ static void sx_disable_tx_interrupts(void *ptr); static void sx_enable_tx_interrupts(void *ptr); @@ -1011,7 +988,7 @@ static int sx_set_real_termios(void *ptr } sx_dprintk(SX_DEBUG_TERMIOS, "oflags: %x(%d)\n", port->gs.tty->termios->c_oflag, O_OTHER(port->gs.tty)); - /* port->c_dcd = sx_get_CD (port); */ + func_exit(); return 0; } @@ -1173,7 +1150,6 @@ static inline void sx_receive_chars(stru /* Tell the rest of the system the news. Great news. New characters! */ tty_flip_buffer_push(tty); - /* tty_schedule_flip (tty); */ } func_exit(); @@ -1254,9 +1230,6 @@ static irqreturn_t sx_interrupt(int irq, /* AAargh! The order in which to do these things is essential and not trivial. - - Rate limit goes before "recursive". Otherwise a series of - recursive calls will hang the machine in the interrupt routine. - - hardware twiddling goes before "recursive". Otherwise when we poll the card, and a recursive interrupt happens, we won't ack the card, so it might keep on interrupting us. (especially @@ -1271,28 +1244,6 @@ static irqreturn_t sx_interrupt(int irq, - The initialized test goes before recursive. */ -#ifdef IRQ_RATE_LIMIT - /* Aaargh! I'm ashamed. This costs more lines-of-code than the - actual interrupt routine!. (Well, used to when I wrote that - comment) */ - { - static int lastjif; - static int nintr = 0; - - if (lastjif == jiffies) { - if (++nintr > IRQ_RATE_LIMIT) { - free_irq(board->irq, board); - printk(KERN_ERR "sx: Too many interrupts. " - "Turning off interrupt %d.\n", - board->irq); - } - } else { - lastjif = jiffies; - nintr = 0; - } - } -#endif - if (board->irq == irq) { /* Tell the card we've noticed the interrupt. */ @@ -1401,7 +1352,6 @@ static void sx_enable_tx_interrupts(void static void sx_disable_rx_interrupts(void *ptr) { - /* struct sx_port *port = ptr; */ func_enter(); func_exit(); @@ -1409,7 +1359,6 @@ static void sx_disable_rx_interrupts(voi static void sx_enable_rx_interrupts(void *ptr) { - /* struct sx_port *port = ptr; */ func_enter(); func_exit(); @@ -1505,13 +1454,8 @@ static int sx_open(struct tty_struct *tt if (port->gs.count <= 1) sx_setsignals(port, 1, 1); -#if 0 - if (sx_debug & SX_DEBUG_OPEN) - my_hd(port, sizeof(*port)); -#else if (sx_debug & SX_DEBUG_OPEN) my_hd_io(port->board->base + port->ch_base, sizeof(*port)); -#endif if (port->gs.count <= 1) { if (sx_send_command(port, HS_LOPEN, -1, HS_IDLE_OPEN) != 1) { @@ -1535,7 +1479,6 @@ static int sx_open(struct tty_struct *tt return retval; } - /* tty->low_latency = 1; */ port->c_dcd = sx_get_CD(port); sx_dprintk(SX_DEBUG_OPEN, "at open: cd=%d\n", port->c_dcd); @@ -1576,9 +1519,6 @@ static void sx_close(void *ptr) if (port->gs.count) { sx_dprintk(SX_DEBUG_CLOSE, "WARNING port count:%d\n", port->gs.count); - /*printk("%s SETTING port count to zero: %p count: %d\n", - __FUNCTION__, port, port->gs.count); - port->gs.count = 0;*/ } func_exit(); @@ -1641,52 +1581,6 @@ static int do_memtest(struct sx_board *b #undef R0 #undef R1 -#define MARCHUP for (i = min; i < max; i += 2) -#define MARCHDOWN for (i = max - 1; i >= min; i -= 2) -#define W0 write_sx_word(board, i, 0x55aa) -#define W1 write_sx_word(board, i, 0xaa55) -#define R0 if (read_sx_word(board, i) != 0x55aa) return 1 -#define R1 if (read_sx_word(board, i) != 0xaa55) return 1 - -#if 0 -/* This memtest takes a human-noticable time. You normally only do it - once a boot, so I guess that it is worth it. */ -static int do_memtest_w(struct sx_board *board, int min, int max) -{ - int i; - - MARCHUP { - W0; - } - MARCHUP { - R0; - W1; - R1; - W0; - R0; - W1; - } - MARCHUP { - R1; - W0; - W1; - } - MARCHDOWN { - R1; - W0; - W1; - W0; - } - MARCHDOWN { - R0; - W1; - W0; - } - - return 0; -} -#endif - static int sx_fw_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { @@ -1700,13 +1594,8 @@ static int sx_fw_ioctl(struct inode *ino func_enter(); -#if 0 /* Removed superuser check: Sysops can use the permissions on the device file to restrict access. Recommendation: Root only. (root.root 600) */ - if (!capable(CAP_SYS_ADMIN)) { - return -EPERM; - } -#endif sx_dprintk(SX_DEBUG_FIRMWARE, "IOCTL %x: %lx\n", cmd, arg); @@ -1756,10 +1645,8 @@ static int sx_fw_ioctl(struct inode *ino rc = do_memtest(board, 0, 0x7000); if (!rc) rc = do_memtest(board, 0, 0x7000); - /*if (!rc) rc = do_memtest_w (board, 0, 0x7000); */ } else { rc = do_memtest(board, 0, 0x7ff8); - /* if (!rc) rc = do_memtest_w (board, 0, 0x7ff8); */ } sx_dprintk(SX_DEBUG_FIRMWARE, "returning memtest result= %d\n", rc); @@ -1893,8 +1780,6 @@ static int sx_ioctl(struct tty_struct *t void __user *argp = (void __user *)arg; int ival; - /* func_enter2(); */ - rc = 0; switch (cmd) { case TIOCGSOFTCAR: @@ -1919,7 +1804,6 @@ static int sx_ioctl(struct tty_struct *t break; } - /* func_exit(); */ return rc; } @@ -2030,7 +1914,6 @@ static int sx_init_board(struct sx_board } /* grab the first module type... */ - /* board->ta_type = mod_compat_type (read_sx_byte (board, 0x80 + 0x08)); */ board->ta_type = mod_compat_type(sx_read_module_byte(board, 0x80, mc_chip)); @@ -2075,17 +1958,6 @@ static int sx_init_board(struct sx_board chans = 0; break; } -#if 0 /* Problem fixed: firmware 3.05 */ - if (IS_SX_BOARD(board) && (type == TA8)) { - /* There are some issues with the firmware and the DCD/RTS - lines. It might work if you tie them together or something. - It might also work if you get a newer sx_firmware. Therefore - this is just a warning. */ - printk(KERN_WARNING - "sx: The SX host doesn't work too well " - "with the TA8 adapters.\nSpecialix is working on it.\n"); - } -#endif } if (chans) { @@ -2465,8 +2337,6 @@ static int sx_init_portstructs(int nboar } sx_dprintk(SX_DEBUG_PROBE, "\n"); } - /* This has to be done earlier. */ - /* board->flags |= SX_BOARD_INITIALIZED; */ } func_exit(); _ Patches currently in -mm which might be from jirislaby@xxxxxxxxx are mxser-correct-tty-driver-name.patch pci-mxser-pci-refcounts.patch mxser-make-an-experimental-clone.patch char-mxser_new-correct-include-file.patch char-mxser_new-upgrade-to-191.patch char-mxser_new-rework-to-allow-dynamic-structs.patch char-mxser_new-use-__devinit-macros.patch char-mxser_new-pci_request_region-for-pci-regions.patch char-mxser_new-check-request_region-retvals.patch char-mxser_new-kill-unneeded-memsets.patch char-mxser_new-revert-spin_lock-changes.patch char-mxser_new-remove-request-for-testers-line.patch char-mxser_new-debug-printk-dependent-on-debug.patch char-mxser_new-alter-license-terms.patch char-mxser_new-code-upside-down.patch char-mxser_new-cmspar-is-defined.patch char-remove-unneded-termbits-redefinitions-mxser_new.patch char-mxser_new-eliminate-tty-ldisc-deref.patch char-mxser_new-testbit-for-bit-testing.patch char-mxser_new-correct-fail-paths.patch char-mxser_new-dont-check-tty_unregister-retval.patch char-mxser_new-compress-isa-finding.patch char-mxser_new-register-tty-devices-on-the-fly.patch char-mxser_new-compact-structures-round2.patch char-mxser_new-reverse-if-else-paths-patch.patch char-mxser_new-comments-cleanup.patch char-mxser_new-correct-intr-handler-proto.patch char-mxser_new-delete-ttys-and-termios.patch char-mxser_new-pci-probing.patch char-mxser_new-clean-macros.patch maintainers-add-me-to-isicom-mxser.patch mxser_new-correct-tty-driver-name.patch char-stallion-use-pr_debug-macro.patch char-stallion-remove-unneeded-casts.patch char-stallion-kill-typedefs.patch char-stallion-move-init-deinit.patch char-stallion-uninline-functions.patch char-stallion-mark-functions-as-init.patch char-stallion-remove-many-prototypes.patch char-isicom-expand-function.patch char-isicom-rename-init-function.patch char-isicom-remove-isa-code.patch char-isicom-remove-unneeded-memset.patch char-isicom-move-to-tty_register_device.patch char-isicom-use-pci_request_region.patch char-isicom-check-kmalloc-retval.patch char-isicom-use-completion.patch char-isicom-simplify-timer.patch char-isicom-remove-cvs-stuff.patch char-isicom-fix-tty-index-check.patch char-sx-convert-to-pci-probing.patch char-sx-use-kcalloc.patch char-sx-mark-functions-as-devinit.patch char-sx-use-eisa-probing.patch char-sx-ifdef-isa-code.patch char-sx-lock-boards-struct.patch char-sx-remove-duplicite-code.patch char-sx-whitespace-cleanup.patch char-sx-remove-unneeded-stuff.patch char-sx-simplify-timer-logic.patch char-sx-fix-return-in-module-init.patch char-sx-use-pci_iomap.patch char-sx-request-regions.patch char-stallion-convert-to-pci-probing.patch char-stallion-prints-cleanup.patch char-stallion-implement-fail-paths.patch char-stallion-correct-__init-macros.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html