This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH]: Fix ser-go32.c for UARTs with FIFOs.
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Subject: Re: [PATCH]: Fix ser-go32.c for UARTs with FIFOs.
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 05 Feb 2001 19:13:19 -0800
- Cc: gdb-patches at sourceware dot cygnus dot com, Francisco Pastor <fpastor dot etra-id at etra dot es>
- References: <Pine.SUN.3.91.1010204094707.20547Q-100000@is>
Eli Zaretskii wrote:
>
> FYI: I committed today the following patch:
>
> 2001-02-04 Eli Zaretskii <eliz@is.elta.co.il>
>
> * ser-go32.c (dos_write) [UART_FIFO_WORKS]: Use outportsb only if
> UART_FIFO_WORKS is defined. Otherwise use outportb.
> From Francisco Pastor <fpastor.etra-id@etra.es>
Eli, would it be better to make this a run-time option?
Andrew
>
> --- gdb/ser-go32.c~0 Sun Jul 30 04:48:26 2000
> +++ gdb/ser-go32.c Sat Feb 3 19:49:06 2001
> @@ -796,9 +796,16 @@ dos_write (serial_t scb, const char *str
> /* send the data, fifosize bytes at a time */
> cnt = fifosize > len ? len : fifosize;
> port->txbusy = 1;
> + /* Francisco Pastor <fpastor.etra-id@etra.es> says OUTSB messes
> + up the communications with UARTs with FIFOs. */
> +#ifdef UART_FIFO_WORKS
> outportsb (port->base + com_data, str, cnt);
> str += cnt;
> len -= cnt;
> +#else
> + for ( ; cnt > 0; cnt--, len--)
> + outportb (port->base + com_data, *str++);
> +#endif
> #ifdef DOS_STATS
> cnts[CNT_TX] += cnt;
> #endif