Changes to UART ns8250
Ian Lepore
ian at FreeBSD.org
Mon Oct 7 20:56:35 UTC 2013
On Mon, 2013-10-07 at 22:36 +0200, Zbigniew Bodek wrote:
> Hello Adrian,
>
> Thank you for your remarks.
> Please check my answers in-line.
>
> Best regards
> Zbigniew Bodek
>
>
> 2013/10/7 Adrian Chadd <adrian at freebsd.org>
>
> > Hi,
> >
> > You should add:
> >
> > * a loop counter, to break out after a while;
> >
> [ZBB] In general as long as UART is busy we cannot proceed but if the
> timeout occurs we could return an error. Do you agree?
>
> > * a DELAY(1) or something.
> >
> [ZBB] DELAY is also a busy wait after all. The reasonable solution might be
> to use ns8250_delay() to get the transmission time and use it for timeout
> from the first point. I would DELAY(1) in each loop and decrement value
> acquired from ns8250_delay(). The loop should break during that time or we
> return an error. What do you think?
>
Is it possible to not busy-wait at all? Something like the attached?
-- Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: temp.diff
Type: text/x-patch
Size: 1058 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20131007/3b9a5d60/attachment.bin>
More information about the freebsd-current
mailing list