Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354824
b: refs/heads/master
c: 384e301
h: refs/heads/master
v: v3
  • Loading branch information
Liang Li authored and Greg Kroah-Hartman committed Jan 21, 2013
1 parent e51b135 commit eea9ef5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64325a3be08d364a62ee8f84b2cf86934bc2544a
refs/heads/master: 384e301e3519599b000c1a2ecd938b533fc15d85
29 changes: 22 additions & 7 deletions trunk/drivers/tty/serial/pch_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,22 +1024,37 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
static void pch_uart_err_ir(struct eg20t_port *priv, unsigned int lsr)
{
u8 fcr = ioread8(priv->membase + UART_FCR);
struct uart_port *port = &priv->port;
struct tty_struct *tty = tty_port_tty_get(&port->state->port);
char *error_msg[5] = {};
int i = 0;

/* Reset FIFO */
fcr |= UART_FCR_CLEAR_RCVR;
iowrite8(fcr, priv->membase + UART_FCR);

if (lsr & PCH_UART_LSR_ERR)
dev_err(&priv->pdev->dev, "Error data in FIFO\n");
error_msg[i++] = "Error data in FIFO\n";

if (lsr & UART_LSR_FE) {
port->icount.frame++;
error_msg[i++] = " Framing Error\n";
}

if (lsr & UART_LSR_FE)
dev_err(&priv->pdev->dev, "Framing Error\n");
if (lsr & UART_LSR_PE) {
port->icount.parity++;
error_msg[i++] = " Parity Error\n";
}

if (lsr & UART_LSR_PE)
dev_err(&priv->pdev->dev, "Parity Error\n");
if (lsr & UART_LSR_OE) {
port->icount.overrun++;
error_msg[i++] = " Overrun Error\n";
}

if (lsr & UART_LSR_OE)
dev_err(&priv->pdev->dev, "Overrun Error\n");
if (tty == NULL) {
for (i = 0; error_msg[i] != NULL; i++)
dev_err(&priv->pdev->dev, error_msg[i]);
}
}

static irqreturn_t pch_uart_interrupt(int irq, void *dev_id)
Expand Down

0 comments on commit eea9ef5

Please sign in to comment.