[PATCH 3/7] bsp/tms570: fixed sci driver freeze when closing terminal bug
Gedare Bloom
gedare at rtems.org
Sun Nov 15 13:44:24 UTC 2015
On Thu, Nov 12, 2015 at 5:11 PM, Pavel Pisa <pisa at cmp.felk.cvut.cz> wrote:
> From: Premysl Houdek <kom541000 at gmail.com>
>
> tms570_sci_interrupt_last_close: do not wait for old data transmit.
>
> Signed-off-by: Premysl Houdek <kom541000 at gmail.com>
> ---
> c/src/lib/libbsp/arm/tms570/console/tms570-sci.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c b/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c
> index 54c1b69..a799a66 100644
> --- a/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c
> +++ b/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c
> @@ -531,9 +531,11 @@ static void tms570_sci_interrupt_last_close(
> tms570_sci_disable_interrupts(ctx);
> rtems_termios_device_lock_release(base, &lock_context);
>
> - /* Flush device */
> - while ( ( ctx->regs->FLR & TMS570_SCI_FLR_TX_EMPTY ) > 0 ) {
> - ;/* Wait until all data has been sent */
> + if ( 0 /* for flush on close */ ) {
I don't understand, this is dead code now?
> + /* Flush device */
> + while ( ( ctx->regs->FLR & TMS570_SCI_FLR_TX_EMPTY ) == 0 ) {
> + ;/* Wait until all data has been sent */
> + }
> }
>
> /* uninstall ISR */
> --
> 1.9.1
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list