Date: Thu, 19 Apr 2007 14:10:21 -0700 From: Alfred Perlstein <alfred@freebsd.org> To: hackers@freebsd.org, bde@freebsd.org Subject: serial help ? Message-ID: <20070419211021.GH69188@elvis.mu.org>
next in thread | raw e-mail | index | archive | help
I'm working on some custom hardware and I'm getting garbled console output. I noticed that siocntxwait looks like this: static void siocntxwait(iobase) Port_t iobase; { int timo; /* * Wait for any pending transmission to finish. Required to avoid * the UART lockup bug when the speed is changed, and for normal * transmits. */ timo = 100000; while ((inb(iobase + com_lsr) & (LSR_TSRE | LSR_TXRDY)) != (LSR_TSRE | LSR_TXRDY) && --timo != 0) ; } Shouldn't there be some sort of DELAY in there? My platform has an emulated serial device in hardware, so it may be that the loop could run a LOT faster than transmit can happen... any ideas of what the DELAY should be? -- - Alfred Perlstein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070419211021.GH69188>