That's it. The one I get from projects.buici.com, serial_lh7a400.c.diff, but apply to serial_amba_pl011.c.
After that, I compiled several versions fo pppd, and works fine.
[root@magutierrez serial]# diff -u serial_amba_pl011.c_orig serial_amba_pl011.c
--- serial_amba_pl011.c_orig 2004-11-30 12:50:40.000000000 +0100
+++ serial_amba_pl011.c 2004-12-10 09:32:26.000000000 +0100
@@ -251,7 +251,7 @@
static void amba11uart_tx_chars(struct uart_info *info)
{
struct uart_port *port = info->port;
- int count;
+ int status;
if (port->x_char) {
UART_PUT_CHAR(port, port->x_char);
@@ -266,14 +266,25 @@
return;
}
- count = port->fifosize >> 1;
+ /* This assumes that there is room for at least one byte in
+ * the Tx FIFO. This ought to be true because of the fact
+ * that this is a service routine. Too, it will continue to
+ * push out bytes until either the transmit queue is empty or
+ * the FIFO fills. At 115200 baud, the transmitter sends a
+ * byte every 90us. No matter how unlikely, if the baudrate
+ * increases sufficiently to overcome the processor cycle
+ * time, it may be possible that this loop will always empty
+ * the transmit queue to the detriment of system
+ * responsiveness.
+ */
+
do {
UART_PUT_CHAR(port, info->xmit.buf[info->xmit.tail]);
info->xmit.tail = (info->xmit.tail + 1) & (UART_XMIT_SIZE - 1);
- port->icount.tx++;
- if (info->xmit.head == info->xmit.tail)
- break;
- } while (--count > 0);
+ ++port->icount.tx;
+ status = UART_GET_FR(port);
+ } while (UART_TX_READY (status)
+ && info->xmit.head != info->xmit.tail);
if (CIRC_CNT(info->xmit.head, info->xmit.tail, UART_XMIT_SIZE) <
WAKEUP_CHARS)
|