PERFORCE change 95896 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sat Apr 22 22:16:52 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=95896
Change 95896 by marcel at marcel_nfs on 2006/04/22 22:15:54
Calculate the divisor before we set the DLAB bit. We can bail
out, and would otherwise leave DLAB set.
Affected files ...
.. //depot/projects/uart/dev/uart/uart_dev_ns8250.c#41 edit
Differences ...
==== //depot/projects/uart/dev/uart/uart_dev_ns8250.c#41 (text+ko) ====
@@ -194,11 +194,11 @@
/* Set baudrate. */
if (baudrate > 0) {
- uart_setreg(bas, REG_LCR, lcr | LCR_DLAB);
- uart_barrier(bas);
divisor = ns8250_divisor(bas->rclk, baudrate);
if (divisor == 0)
return (EINVAL);
+ uart_setreg(bas, REG_LCR, lcr | LCR_DLAB);
+ uart_barrier(bas);
uart_setdreg(bas, REG_DL, divisor);
uart_barrier(bas);
}
More information about the p4-projects
mailing list