From owner-cvs-src@FreeBSD.ORG Tue Apr 3 01:21:11 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F274A16A402; Tue, 3 Apr 2007 01:21:10 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id E33E913C44C; Tue, 3 Apr 2007 01:21:10 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l331LAWu034534; Tue, 3 Apr 2007 01:21:10 GMT (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l331LAuN034529; Tue, 3 Apr 2007 01:21:10 GMT (envelope-from marcel) Message-Id: <200704030121.l331LAuN034529@repoman.freebsd.org> From: Marcel Moolenaar Date: Tue, 3 Apr 2007 01:21:10 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/uart uart_dev_ns8250.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 01:21:11 -0000 marcel 2007-04-03 01:21:10 UTC FreeBSD src repository Modified files: sys/dev/uart uart_dev_ns8250.c Log: Don't use a time-limiting loop that's defined in terms of the baudrate in the putc() method. Likewise, in the getc() method, don't check for received characters with an interval defined in terms of the baudrate. In both cases it works equally well to implement a fixed delay. More importantly, it avoids calculating a delay that's roughly 1/10th the time it takes to send/receive a character. The calculation is costly and happens for every character sent or received, affecting low-level console or debug port performance significantly. Secondly, when the RCLK is not available or unreliable, the delays could disrupt normal operation. The fixed delay is 1/10th the time it takes to send a character at 230400 bps. Revision Changes Path 1.27 +7 -13 src/sys/dev/uart/uart_dev_ns8250.c