Messages in this thread | | | Date | Mon, 17 Dec 2012 18:23:43 +0000 | From | Alan Cox <> | Subject | Re: [PATCH] serial: tegra: add serial driver |
| |
> + > +static void tegra_uart_copy_rx_to_tty(struct tegra_uart_port *tup, int count) > +{ > + int copied; > + > + tup->uport.icount.rx += count; > + dma_sync_single_for_cpu(tup->uport.dev, tup->rx_dma_buf_phys, > + TEGRA_UART_RX_DMA_BUFFER_SIZE, DMA_FROM_DEVICE); > + copied = tty_insert_flip_string(tup->uport.state->port.tty,
Reference needed and port.tty can go to NULL (good rule of thumb - any use of port.tty directly is probably wrong)
> + tty_flip_buffer_push(u->state->port.tty);
Ditto (and elsewhere)
> + if ((c_cflag & PARENB) == PARENB) { > + symb_bit++; > + if ((c_cflag & CMSPAR) == CMSPAR) { > + dev_err(tup->uport.dev, "Space parity not supported\n"); > + return;
No - this is out of spec and lets user tasks spam the log. Just clear the flag if not supported.
> + /* Baud rate. */ > + baud = uart_get_baud_rate(u, termios, oldtermios, 200, 4000000); > + spin_unlock_irqrestore(&u->lock, flags); > + tegra_set_baudrate(tup, baud); > + spin_lock_irqsave(&u->lock, flags);
I think you need to use the helpers to put the actual baud it got into the termios if not B0 - see 8250.c ?
Alan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |