[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Qemu serial patch





On 24/9/06 23:13, "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx> wrote:

> -            qemu_chr_write(s->chr, &ch, 1);
> +            if (qemu_chr_write(s->chr, &ch, 1) == -1)
> +                fprintf(logfile, "serial write error\n");
>              s->thr_ipending = 1;
>              s->lsr |= UART_LSR_THRE;
>              s->lsr |= UART_LSR_TEMT;
> 
> Doesn't the above mean we still drop the character? Shouldn't we be
> storing the character somewhere and retrying it later? We should
> probably also clear the tx ready bit (bit 5) in the UART's Line Status
> Register. We should then retry the write in ~100ms, and set the tx ready
> bit again.

There's not even any need to poll, if the serial fd is in the set of
writefd's. Buffering internally to some reasonable limit and then clearing
THRE until the fd appears in the pollset and some FIFO space is cleared is
the right thing to do.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.